﻿using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Globalization;
using System.Data;
using System.Data.Common;
using System.Xml;
using System.Text;
using LibHuman;
using log4net;

namespace Human
{
   
    public class frmHopDong : System.Windows.Forms.Form
    {

        #region
        private string mn = null, m_user = "", sql = "", ndct = "", TSo = "", n_filed_hopdong = "",user_dn="";
        private string n_manv = "", n_schema = "", n_madv = "", n_macv = "",ten_nd="",s_mmyy="";
        string s_vk="",s_tlvk="",s_stvk="", s_cv = "", s_tlcv = "", s_stcv = "", s_db = "", s_tldb = "", s_stdb = "", s_th = "", s_tlth = "", s_stth = "",
            s_ld = "", s_tlld = "", s_stld = "", s_dh = "", s_tldh = "", s_stdh = "", s_kv = "", s_tlkv = "", s_stkv = "",
            s_dt = "", s_tldt = "", s_stdt = "", s_ud = "", s_tlud = "", s_stud = "", s_tn = "", s_tltn = "", s_sttn = "",
            s_ta = "", s_tlta = "", s_stta = "", s_tx = "", s_tltx = "", s_sttx = "",s_tdt="",s_tltdt="",s_sttdt="", s_kh = "", s_tlkh = "", s_stkh = "";
        int luonghd = 0,ngachdn=0,hd_bantg=0,luong_sp=0;
        private bool bEdit = false, bDgcbcc = false,admin=false;
        private static readonly ILog _logger = LogManager.GetLogger(typeof(frmHopDong).Name);
        private bool bWriteToLog = _logger.IsErrorEnabled;
        private AccessData mDB = new AccessData();
        Language lan = new Language();
        private DataSet ds0 = new DataSet();
        private DataSet ds1 = new DataSet();
        private bool bClear = true;
        DataTable dt_dgcb = new DataTable();
        private DataSet dsxml_hopdong = new DataSet();
        private DataSet adsHdtruoc;
        private System.Windows.Forms.Label lblTenPhongCT;
        private System.Windows.Forms.Label label29;
        private System.Windows.Forms.CheckBox chk_xemttkl;
        private System.Windows.Forms.CheckBox chk_xemttkt;
        private System.Windows.Forms.ComboBox cbo_lydonghi;
        private System.Windows.Forms.Label label73;
        private System.Windows.Forms.Label label72;
        private System.Windows.Forms.GroupBox groupBox1;
        private System.Windows.Forms.Label lbl_ld;
        private System.Windows.Forms.TextBox txt_hsld;
        private System.Windows.Forms.TextBox txt_hsdb;
        private System.Windows.Forms.TextBox txt_hskv;
        private System.Windows.Forms.TextBox txt_hsdh;
        private System.Windows.Forms.TextBox txt_hsdt;
        private System.Windows.Forms.Label lbl_db;
        private System.Windows.Forms.TextBox txt_hsth;
        private System.Windows.Forms.Label label68;
        private System.Windows.Forms.Label lbl_dh;
        private System.Windows.Forms.TextBox txt_pcta;
        private System.Windows.Forms.TextBox txt_hscv;
        private System.Windows.Forms.Label lbl_kv;
        private System.Windows.Forms.TextBox txt_hesolc;
        private System.Windows.Forms.Label lbl_ta;
        private System.Windows.Forms.Label lbl_cv;
        private System.Windows.Forms.Label label66;
        private System.Windows.Forms.CheckBox chk_bhyt;
        private System.Windows.Forms.CheckBox chk_bhxh;
        private System.Windows.Forms.TextBox txt_mltt;
        private System.Windows.Forms.TextBox txt_ngayphep;
        private System.Windows.Forms.TextBox txt_luongcb;
        private System.Windows.Forms.ComboBox cbo_ngachcc;
        private System.Windows.Forms.Label label60;
        private System.Windows.Forms.ComboBox cbo_loaihd;
        private System.Windows.Forms.NumericUpDown num_sothanghd;
        private System.Windows.Forms.Label label53;
        private System.Windows.Forms.Label label57;
        private System.Windows.Forms.Label label61;
        private System.Windows.Forms.Label label47;
        private System.Windows.Forms.Label label58;
        private System.Windows.Forms.Label label54;
        private System.Windows.Forms.Label label111;
        private System.Windows.Forms.TextBox txt_sohd;
        private System.Windows.Forms.Label label55;
        private System.Windows.Forms.Label label169;
        private System.Windows.Forms.TextBox txtTSo;
        private System.Windows.Forms.Label label27;
        private System.Windows.Forms.Panel panButLyLich;
        private System.Windows.Forms.Button btn_luu;
        private System.Windows.Forms.Button btn_huy;
        private System.Windows.Forms.Button btn_ketthuc;
        private MaskedBox.MaskedBox dtpNgayCapCMND;
        private System.Windows.Forms.TextBox cboBoPhan;
        private System.Windows.Forms.TextBox cboChucVu;
        private System.Windows.Forms.ContextMenu dgrHopDongKTcontextMenu;
        private System.Windows.Forms.ContextMenu dgrHopDongKLcontextMenu;
        private System.Windows.Forms.MenuItem menuItem1;
        private System.Windows.Forms.MenuItem menuItem2;
        private System.Windows.Forms.MenuItem menuItem3;
        private System.Windows.Forms.MenuItem menuItem4;
        private System.Windows.Forms.Button cmdLuu_CT;
        private System.Windows.Forms.Button cmdLuu_KT;
        private System.Windows.Forms.ToolTip toolTip1;
        private System.Windows.Forms.Label label6;
        private System.Windows.Forms.Label label7;
        private System.Windows.Forms.ComboBox cbo_tuyendung;
        private System.Windows.Forms.Label lbl_vk;
        private System.Windows.Forms.TextBox txt_hsvk;
        private System.Windows.Forms.Label lbl_tlvk;
        private System.Windows.Forms.Label label10;
        private System.Windows.Forms.Label label11;
        private System.Windows.Forms.ComboBox cbo_ghichu;
        private System.Windows.Forms.CheckBox chk_xemhsl;
        private System.Windows.Forms.Label label22;
        private System.Windows.Forms.Label lbl_tlud;
        private System.Windows.Forms.Label lbl_ud;
        private System.Windows.Forms.TextBox txt_pckh;
        private System.Windows.Forms.TextBox txt_hstn;
        private System.Windows.Forms.Label lbl_tn;
        private System.Windows.Forms.ComboBox cbo_bac;
        private System.Windows.Forms.Button btn_them;
        private System.Windows.Forms.Button btn_sua;
        private System.Windows.Forms.TextBox txtLan;
        private System.Windows.Forms.Button btn_boqua;
        private ToolStrip toolStrip3;
        private ToolStripLabel lblHD;
        private Label lblMasoNVCT;
        private Label label28;
        private TextBox txtBac;
        private Panel pHanhchanh;
        private MaskedTextBox txt_ngaydenct;
        private MaskedTextBox txt_tungayhd;
        private MaskedTextBox txt_ngayhuongluong;
        private MaskedTextBox txt_denngayhd;
        private MaskedTextBox txt_ngaygiubac;
        private MaskedTextBox txt_ngayvk;
        private MaskedTextBox txt_ngaybhiem;
        private MaskedTextBox txt_ngaynghi;
        private DataGridView dgrhsl;
        private ComboBox cbo_hsbdhv;
        private Label label1;
        private Label ng;
        private MaskedTextBox txt_ngaykyhd;
        private Panel p_thuviec;
        private MaskedTextBox txt_denngaytv;
        private MaskedTextBox txt_tungaytv;
        private Label l_denngay;
        private Label l_tungay;
        private Label l_ngaychinhthuc;
        private MaskedTextBox txt_ngaychinhthuc;
        private Label label5;
        private TextBox txt_phepthem;
        private CheckBox chk_tbnghihuu;
        private TextBox txt_sotienhd;
        private Label label15;
        private NumericUpDown num_sothangtbnh;
        private Button btn_in;
        private DataGridViewTextBoxColumn Column1;
        private DataGridViewTextBoxColumn Column2;
        private DataGridViewTextBoxColumn Column3;
        private DataGridViewTextBoxColumn Column4;
        private DataGridViewTextBoxColumn Column5;
        private DataGridViewTextBoxColumn Column6;
        private DataGridViewTextBoxColumn Column7;
        private DataGridViewTextBoxColumn Column8;
        private DataGridViewTextBoxColumn Column9;
        private DataGridViewTextBoxColumn Column11;
        private DataGridViewTextBoxColumn Column12;
        private DataGridViewTextBoxColumn Column13;
        private DataGridViewTextBoxColumn Column14;
        private DataGridViewTextBoxColumn Column15;
        private DataGridViewTextBoxColumn Column16;
        private DataGridViewTextBoxColumn Column10;
        private GroupBox groupDgcbcc;
        private Label label18;
        private Label label2;
        private Label label16;
        private Label label17;
        private Label label19;
        private Label label20;
        private Label label21;
        private Label label3;
        private Label label4;
        private Label label25;
        private ComboBox txtdg1;
        private ComboBox txtdg4;
        private ComboBox txtdg7;
        private ComboBox txtdg9;
        private ComboBox txtdg8;
        private ComboBox txtdg5;
        private ComboBox txtdg10;
        private ComboBox txtdg2;
        private ComboBox txtdg3;
        private ComboBox txtdg6;
        private Label label26;
        private ComboBox txtdg11;
        private TextBox txt_hsud;
        private Label lbl_th;
        private Label lbl_dt;
        private Label label32;
        private Label lblHoTenNVCT;
        private Label lbl_tldb;
        private Label lbl_kh;
        private CheckBox chk_bhtn;
        private Label label37;
        private TextBox txt_ghichuct;
        private Label label38;
        private Label lbl_tx;
        private TextBox txt_pctx;
        private Label lbl_tldt;
        private MaskedTextBox txt_nhluonghd;
        private Label label83;
        private Label label77;
        private Label label71;
        private Label label59;
        private Label lbl_sotienhd;
        private Label lbl_nhluonghd;
        private Label label46;
        private Panel p_hdbantg;
        private Label label12;
        private ComboBox cbo_lhdbantg;
        private Label label14;
        private Label lbl_sthdbantg;
        private TextBox txt_stbantg;
        private CheckBox chk_luongsp;
        private TextBox txt_pctdt;
        private Label lbl_pctdt;
        private TextBox txt_tongcong;
        private Label label8;
        private Label label9;
        private System.ComponentModel.IContainer components;
        #endregion
        public frmHopDong(string manv, string hoten, string madv, DataSet m_ds0,bool m_admin,string tennd)
        {
            InitializeComponent();
            lan.Read_Language_to_Xml(this.Name.ToString(), this);
            lan.Changelanguage_to_English(this.Name.ToString(), this);
            m_user = mDB.user;

            lblMasoNVCT.Text = manv;
            n_manv = manv;
            lblHoTenNVCT.Text = hoten.Trim();
            lblTenPhongCT.Text = madv;
            ds0 = m_ds0;
            n_schema = mDB.user;
            admin = m_admin;
            ten_nd = tennd;
        }
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (components != null)
                {
                    components.Dispose();
                }
            }
            base.Dispose(disposing);
        }
        string ngaygiubac = "", bacluongcu = "", ngaynangbac = "", bacluongmoi = "", mangachcu = "", mangachmoi = "";
        string loaiphucap = "", hs_cu = "", ngayquydinh = "", hs_moi = "", ngaygiu = "", ngay = "",nglhd_cu="",nglhd_moi="";
        decimal sthd_cu = 0, sthd_moi = 0;
        #region Windows Form Designer generated code
         private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmHopDong));
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
            this.lblTenPhongCT = new System.Windows.Forms.Label();
            this.label29 = new System.Windows.Forms.Label();
            this.dgrHopDongKTcontextMenu = new System.Windows.Forms.ContextMenu();
            this.menuItem1 = new System.Windows.Forms.MenuItem();
            this.menuItem2 = new System.Windows.Forms.MenuItem();
            this.dgrHopDongKLcontextMenu = new System.Windows.Forms.ContextMenu();
            this.menuItem3 = new System.Windows.Forms.MenuItem();
            this.menuItem4 = new System.Windows.Forms.MenuItem();
            this.chk_xemttkl = new System.Windows.Forms.CheckBox();
            this.chk_xemttkt = new System.Windows.Forms.CheckBox();
            this.cbo_lydonghi = new System.Windows.Forms.ComboBox();
            this.label73 = new System.Windows.Forms.Label();
            this.label72 = new System.Windows.Forms.Label();
            this.groupBox1 = new System.Windows.Forms.GroupBox();
            this.label9 = new System.Windows.Forms.Label();
            this.txt_tongcong = new System.Windows.Forms.TextBox();
            this.txt_pctdt = new System.Windows.Forms.TextBox();
            this.lbl_tx = new System.Windows.Forms.Label();
            this.lbl_kh = new System.Windows.Forms.Label();
            this.lbl_pctdt = new System.Windows.Forms.Label();
            this.lbl_dt = new System.Windows.Forms.Label();
            this.lbl_th = new System.Windows.Forms.Label();
            this.txt_hsud = new System.Windows.Forms.TextBox();
            this.label8 = new System.Windows.Forms.Label();
            this.lbl_tn = new System.Windows.Forms.Label();
            this.txt_hstn = new System.Windows.Forms.TextBox();
            this.lbl_tldb = new System.Windows.Forms.Label();
            this.lbl_tlud = new System.Windows.Forms.Label();
            this.txt_pctx = new System.Windows.Forms.TextBox();
            this.lbl_ud = new System.Windows.Forms.Label();
            this.txt_pckh = new System.Windows.Forms.TextBox();
            this.label22 = new System.Windows.Forms.Label();
            this.lbl_ld = new System.Windows.Forms.Label();
            this.txt_hsld = new System.Windows.Forms.TextBox();
            this.txt_hsdb = new System.Windows.Forms.TextBox();
            this.txt_hskv = new System.Windows.Forms.TextBox();
            this.txt_hsdh = new System.Windows.Forms.TextBox();
            this.txt_hsdt = new System.Windows.Forms.TextBox();
            this.lbl_tldt = new System.Windows.Forms.Label();
            this.txt_hsth = new System.Windows.Forms.TextBox();
            this.txt_pcta = new System.Windows.Forms.TextBox();
            this.txt_hscv = new System.Windows.Forms.TextBox();
            this.txt_hesolc = new System.Windows.Forms.TextBox();
            this.lbl_cv = new System.Windows.Forms.Label();
            this.txt_hsvk = new System.Windows.Forms.TextBox();
            this.txt_ngayvk = new System.Windows.Forms.MaskedTextBox();
            this.lbl_tlvk = new System.Windows.Forms.Label();
            this.label66 = new System.Windows.Forms.Label();
            this.label68 = new System.Windows.Forms.Label();
            this.lbl_ta = new System.Windows.Forms.Label();
            this.lbl_db = new System.Windows.Forms.Label();
            this.lbl_kv = new System.Windows.Forms.Label();
            this.lbl_dh = new System.Windows.Forms.Label();
            this.lbl_vk = new System.Windows.Forms.Label();
            this.label6 = new System.Windows.Forms.Label();
            this.chk_bhyt = new System.Windows.Forms.CheckBox();
            this.chk_bhxh = new System.Windows.Forms.CheckBox();
            this.txt_mltt = new System.Windows.Forms.TextBox();
            this.txt_ngayphep = new System.Windows.Forms.TextBox();
            this.txt_luongcb = new System.Windows.Forms.TextBox();
            this.cbo_ngachcc = new System.Windows.Forms.ComboBox();
            this.label60 = new System.Windows.Forms.Label();
            this.cbo_loaihd = new System.Windows.Forms.ComboBox();
            this.num_sothanghd = new System.Windows.Forms.NumericUpDown();
            this.label53 = new System.Windows.Forms.Label();
            this.label57 = new System.Windows.Forms.Label();
            this.label61 = new System.Windows.Forms.Label();
            this.label47 = new System.Windows.Forms.Label();
            this.label58 = new System.Windows.Forms.Label();
            this.label54 = new System.Windows.Forms.Label();
            this.label111 = new System.Windows.Forms.Label();
            this.txt_sohd = new System.Windows.Forms.TextBox();
            this.label55 = new System.Windows.Forms.Label();
            this.label169 = new System.Windows.Forms.Label();
            this.txtTSo = new System.Windows.Forms.TextBox();
            this.label27 = new System.Windows.Forms.Label();
            this.panButLyLich = new System.Windows.Forms.Panel();
            this.label37 = new System.Windows.Forms.Label();
            this.txtLan = new System.Windows.Forms.TextBox();
            this.btn_in = new System.Windows.Forms.Button();
            this.btn_boqua = new System.Windows.Forms.Button();
            this.btn_sua = new System.Windows.Forms.Button();
            this.btn_them = new System.Windows.Forms.Button();
            this.btn_luu = new System.Windows.Forms.Button();
            this.btn_huy = new System.Windows.Forms.Button();
            this.btn_ketthuc = new System.Windows.Forms.Button();
            this.dtpNgayCapCMND = new MaskedBox.MaskedBox();
            this.cboBoPhan = new System.Windows.Forms.TextBox();
            this.cboChucVu = new System.Windows.Forms.TextBox();
            this.cmdLuu_CT = new System.Windows.Forms.Button();
            this.cmdLuu_KT = new System.Windows.Forms.Button();
            this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
            this.cbo_hsbdhv = new System.Windows.Forms.ComboBox();
            this.label7 = new System.Windows.Forms.Label();
            this.cbo_tuyendung = new System.Windows.Forms.ComboBox();
            this.label10 = new System.Windows.Forms.Label();
            this.label11 = new System.Windows.Forms.Label();
            this.cbo_ghichu = new System.Windows.Forms.ComboBox();
            this.cbo_bac = new System.Windows.Forms.ComboBox();
            this.chk_xemhsl = new System.Windows.Forms.CheckBox();
            this.toolStrip3 = new System.Windows.Forms.ToolStrip();
            this.lblHD = new System.Windows.Forms.ToolStripLabel();
            this.lblMasoNVCT = new System.Windows.Forms.Label();
            this.label28 = new System.Windows.Forms.Label();
            this.txtBac = new System.Windows.Forms.TextBox();
            this.pHanhchanh = new System.Windows.Forms.Panel();
            this.chk_luongsp = new System.Windows.Forms.CheckBox();
            this.p_hdbantg = new System.Windows.Forms.Panel();
            this.label14 = new System.Windows.Forms.Label();
            this.lbl_sthdbantg = new System.Windows.Forms.Label();
            this.txt_stbantg = new System.Windows.Forms.TextBox();
            this.label12 = new System.Windows.Forms.Label();
            this.cbo_lhdbantg = new System.Windows.Forms.ComboBox();
            this.txt_ghichuct = new System.Windows.Forms.TextBox();
            this.groupDgcbcc = new System.Windows.Forms.GroupBox();
            this.label18 = new System.Windows.Forms.Label();
            this.label2 = new System.Windows.Forms.Label();
            this.label16 = new System.Windows.Forms.Label();
            this.label17 = new System.Windows.Forms.Label();
            this.label19 = new System.Windows.Forms.Label();
            this.label20 = new System.Windows.Forms.Label();
            this.label21 = new System.Windows.Forms.Label();
            this.label3 = new System.Windows.Forms.Label();
            this.label4 = new System.Windows.Forms.Label();
            this.label25 = new System.Windows.Forms.Label();
            this.txtdg1 = new System.Windows.Forms.ComboBox();
            this.txtdg4 = new System.Windows.Forms.ComboBox();
            this.txtdg7 = new System.Windows.Forms.ComboBox();
            this.txtdg9 = new System.Windows.Forms.ComboBox();
            this.txtdg8 = new System.Windows.Forms.ComboBox();
            this.txtdg5 = new System.Windows.Forms.ComboBox();
            this.txtdg10 = new System.Windows.Forms.ComboBox();
            this.txtdg2 = new System.Windows.Forms.ComboBox();
            this.txtdg3 = new System.Windows.Forms.ComboBox();
            this.txtdg6 = new System.Windows.Forms.ComboBox();
            this.label26 = new System.Windows.Forms.Label();
            this.txtdg11 = new System.Windows.Forms.ComboBox();
            this.label15 = new System.Windows.Forms.Label();
            this.num_sothangtbnh = new System.Windows.Forms.NumericUpDown();
            this.txt_sotienhd = new System.Windows.Forms.TextBox();
            this.lbl_sotienhd = new System.Windows.Forms.Label();
            this.chk_tbnghihuu = new System.Windows.Forms.CheckBox();
            this.label5 = new System.Windows.Forms.Label();
            this.txt_phepthem = new System.Windows.Forms.TextBox();
            this.ng = new System.Windows.Forms.Label();
            this.txt_nhluonghd = new System.Windows.Forms.MaskedTextBox();
            this.txt_ngaykyhd = new System.Windows.Forms.MaskedTextBox();
            this.label83 = new System.Windows.Forms.Label();
            this.label1 = new System.Windows.Forms.Label();
            this.dgrhsl = new System.Windows.Forms.DataGridView();
            this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.Column6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.Column7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.Column8 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.Column9 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.Column11 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.Column12 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.Column13 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.Column14 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.Column15 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.Column16 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.Column10 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.txt_ngaynghi = new System.Windows.Forms.MaskedTextBox();
            this.txt_ngaybhiem = new System.Windows.Forms.MaskedTextBox();
            this.txt_ngaygiubac = new System.Windows.Forms.MaskedTextBox();
            this.txt_ngayhuongluong = new System.Windows.Forms.MaskedTextBox();
            this.txt_denngayhd = new System.Windows.Forms.MaskedTextBox();
            this.txt_tungayhd = new System.Windows.Forms.MaskedTextBox();
            this.txt_ngaydenct = new System.Windows.Forms.MaskedTextBox();
            this.label38 = new System.Windows.Forms.Label();
            this.label46 = new System.Windows.Forms.Label();
            this.label77 = new System.Windows.Forms.Label();
            this.chk_bhtn = new System.Windows.Forms.CheckBox();
            this.label71 = new System.Windows.Forms.Label();
            this.label32 = new System.Windows.Forms.Label();
            this.lbl_nhluonghd = new System.Windows.Forms.Label();
            this.label59 = new System.Windows.Forms.Label();
            this.p_thuviec = new System.Windows.Forms.Panel();
            this.l_ngaychinhthuc = new System.Windows.Forms.Label();
            this.txt_ngaychinhthuc = new System.Windows.Forms.MaskedTextBox();
            this.l_denngay = new System.Windows.Forms.Label();
            this.l_tungay = new System.Windows.Forms.Label();
            this.txt_denngaytv = new System.Windows.Forms.MaskedTextBox();
            this.txt_tungaytv = new System.Windows.Forms.MaskedTextBox();
            this.lblHoTenNVCT = new System.Windows.Forms.Label();
            this.groupBox1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.num_sothanghd)).BeginInit();
            this.panButLyLich.SuspendLayout();
            this.toolStrip3.SuspendLayout();
            this.pHanhchanh.SuspendLayout();
            this.p_hdbantg.SuspendLayout();
            this.groupDgcbcc.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.num_sothangtbnh)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.dgrhsl)).BeginInit();
            this.p_thuviec.SuspendLayout();
            this.SuspendLayout();
            // 
            // lblTenPhongCT
            // 
            this.lblTenPhongCT.BackColor = System.Drawing.Color.Blue;
            this.lblTenPhongCT.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lblTenPhongCT.ForeColor = System.Drawing.SystemColors.HighlightText;
            this.lblTenPhongCT.Location = new System.Drawing.Point(586, 1);
            this.lblTenPhongCT.Name = "lblTenPhongCT";
            this.lblTenPhongCT.Size = new System.Drawing.Size(202, 32);
            this.lblTenPhongCT.TabIndex = 4;
            this.lblTenPhongCT.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            // 
            // label29
            // 
            this.label29.BackColor = System.Drawing.Color.Blue;
            this.label29.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label29.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
            this.label29.Location = new System.Drawing.Point(258, 2);
            this.label29.Name = "label29";
            this.label29.Size = new System.Drawing.Size(56, 32);
            this.label29.TabIndex = 2;
            this.label29.Text = "Họ tên ";
            this.label29.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            // 
            // dgrHopDongKTcontextMenu
            // 
            this.dgrHopDongKTcontextMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.menuItem1,
            this.menuItem2});
            // 
            // menuItem1
            // 
            this.menuItem1.Index = 0;
            this.menuItem1.Text = "Thêm";
            // 
            // menuItem2
            // 
            this.menuItem2.Index = 1;
            this.menuItem2.Text = "Hủy";
            // 
            // dgrHopDongKLcontextMenu
            // 
            this.dgrHopDongKLcontextMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.menuItem3,
            this.menuItem4});
            // 
            // menuItem3
            // 
            this.menuItem3.Index = 0;
            this.menuItem3.Text = "Thêm";
            // 
            // menuItem4
            // 
            this.menuItem4.Index = 1;
            this.menuItem4.Text = "Hủy";
            // 
            // chk_xemttkl
            // 
            this.chk_xemttkl.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(160)))));
            this.chk_xemttkl.Location = new System.Drawing.Point(597, 352);
            this.chk_xemttkl.Name = "chk_xemttkl";
            this.chk_xemttkl.Size = new System.Drawing.Size(140, 17);
            this.chk_xemttkl.TabIndex = 37;
            this.chk_xemttkl.Text = "Xem thông tin về kỷ luật";
            this.chk_xemttkl.CheckStateChanged += new System.EventHandler(this.chk_xemttkl_CheckStateChanged);
            this.chk_xemttkl.KeyDown += new System.Windows.Forms.KeyEventHandler(this.chk_xemttkl_KeyDown);
            // 
            // chk_xemttkt
            // 
            this.chk_xemttkt.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(160)))));
            this.chk_xemttkt.Location = new System.Drawing.Point(55, 352);
            this.chk_xemttkt.Name = "chk_xemttkt";
            this.chk_xemttkt.Size = new System.Drawing.Size(169, 17);
            this.chk_xemttkt.TabIndex = 35;
            this.chk_xemttkt.Text = "Xem thông tin về khen thưởng";
            this.chk_xemttkt.CheckStateChanged += new System.EventHandler(this.chk_xemttkt_CheckStateChanged);
            this.chk_xemttkt.KeyDown += new System.Windows.Forms.KeyEventHandler(this.chk_xemttkt_KeyDown);
            // 
            // cbo_lydonghi
            // 
            this.cbo_lydonghi.BackColor = System.Drawing.Color.White;
            this.cbo_lydonghi.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.cbo_lydonghi.ForeColor = System.Drawing.Color.Navy;
            this.cbo_lydonghi.Location = new System.Drawing.Point(356, 328);
            this.cbo_lydonghi.Name = "cbo_lydonghi";
            this.cbo_lydonghi.Size = new System.Drawing.Size(237, 22);
            this.cbo_lydonghi.TabIndex = 34;
            this.cbo_lydonghi.KeyDown += new System.Windows.Forms.KeyEventHandler(this.cbo_lydonghi_KeyDown);
            // 
            // label73
            // 
            this.label73.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label73.ForeColor = System.Drawing.Color.DarkBlue;
            this.label73.Location = new System.Drawing.Point(273, 333);
            this.label73.Name = "label73";
            this.label73.Size = new System.Drawing.Size(82, 13);
            this.label73.TabIndex = 160;
            this.label73.Text = "Lý do nghỉ việc:";
            this.label73.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label72
            // 
            this.label72.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label72.ForeColor = System.Drawing.Color.DarkBlue;
            this.label72.Location = new System.Drawing.Point(23, 333);
            this.label72.Name = "label72";
            this.label72.Size = new System.Drawing.Size(81, 13);
            this.label72.TabIndex = 159;
            this.label72.Text = "Ngày nghỉ việc:";
            this.label72.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // groupBox1
            // 
            this.groupBox1.Controls.Add(this.label9);
            this.groupBox1.Controls.Add(this.txt_tongcong);
            this.groupBox1.Controls.Add(this.txt_pctdt);
            this.groupBox1.Controls.Add(this.lbl_tx);
            this.groupBox1.Controls.Add(this.lbl_kh);
            this.groupBox1.Controls.Add(this.lbl_pctdt);
            this.groupBox1.Controls.Add(this.lbl_dt);
            this.groupBox1.Controls.Add(this.lbl_th);
            this.groupBox1.Controls.Add(this.txt_hsud);
            this.groupBox1.Controls.Add(this.label8);
            this.groupBox1.Controls.Add(this.lbl_tn);
            this.groupBox1.Controls.Add(this.txt_hstn);
            this.groupBox1.Controls.Add(this.lbl_tldb);
            this.groupBox1.Controls.Add(this.lbl_tlud);
            this.groupBox1.Controls.Add(this.txt_pctx);
            this.groupBox1.Controls.Add(this.lbl_ud);
            this.groupBox1.Controls.Add(this.txt_pckh);
            this.groupBox1.Controls.Add(this.label22);
            this.groupBox1.Controls.Add(this.lbl_ld);
            this.groupBox1.Controls.Add(this.txt_hsld);
            this.groupBox1.Controls.Add(this.txt_hsdb);
            this.groupBox1.Controls.Add(this.txt_hskv);
            this.groupBox1.Controls.Add(this.txt_hsdh);
            this.groupBox1.Controls.Add(this.txt_hsdt);
            this.groupBox1.Controls.Add(this.lbl_tldt);
            this.groupBox1.Controls.Add(this.txt_hsth);
            this.groupBox1.Controls.Add(this.txt_pcta);
            this.groupBox1.Controls.Add(this.txt_hscv);
            this.groupBox1.Controls.Add(this.txt_hesolc);
            this.groupBox1.Controls.Add(this.lbl_cv);
            this.groupBox1.Controls.Add(this.txt_hsvk);
            this.groupBox1.Controls.Add(this.txt_ngayvk);
            this.groupBox1.Controls.Add(this.lbl_tlvk);
            this.groupBox1.Controls.Add(this.label66);
            this.groupBox1.Controls.Add(this.label68);
            this.groupBox1.Controls.Add(this.lbl_ta);
            this.groupBox1.Controls.Add(this.lbl_db);
            this.groupBox1.Controls.Add(this.lbl_kv);
            this.groupBox1.Controls.Add(this.lbl_dh);
            this.groupBox1.Controls.Add(this.lbl_vk);
            this.groupBox1.Controls.Add(this.label6);
            this.groupBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.groupBox1.ForeColor = System.Drawing.Color.Blue;
            this.groupBox1.Location = new System.Drawing.Point(6, 208);
            this.groupBox1.Name = "groupBox1";
            this.groupBox1.Size = new System.Drawing.Size(772, 114);
            this.groupBox1.TabIndex = 32;
            this.groupBox1.TabStop = false;
            this.groupBox1.Text = "Hệ số";
            // 
            // label9
            // 
            this.label9.Enabled = false;
            this.label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label9.ForeColor = System.Drawing.Color.DarkRed;
            this.label9.Location = new System.Drawing.Point(280, 92);
            this.label9.Name = "label9";
            this.label9.Size = new System.Drawing.Size(18, 15);
            this.label9.TabIndex = 138;
            this.label9.Text = "đ";
            this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            // 
            // txt_tongcong
            // 
            this.txt_tongcong.Enabled = false;
            this.txt_tongcong.ForeColor = System.Drawing.Color.DarkBlue;
            this.txt_tongcong.Location = new System.Drawing.Point(208, 89);
            this.txt_tongcong.Name = "txt_tongcong";
            this.txt_tongcong.Size = new System.Drawing.Size(72, 22);
            this.txt_tongcong.TabIndex = 138;
            this.txt_tongcong.Text = "0";
            // 
            // txt_pctdt
            // 
            this.txt_pctdt.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_pctdt.Location = new System.Drawing.Point(669, 64);
            this.txt_pctdt.Name = "txt_pctdt";
            this.txt_pctdt.Size = new System.Drawing.Size(83, 21);
            this.txt_pctdt.TabIndex = 14;
            this.txt_pctdt.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_pctdt_KeyPress);
            this.txt_pctdt.Validated += new System.EventHandler(this.txt_pctdt_Validated);
            this.txt_pctdt.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_pctdt_KeyDown);
            // 
            // lbl_tx
            // 
            this.lbl_tx.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lbl_tx.ForeColor = System.Drawing.Color.DarkBlue;
            this.lbl_tx.Location = new System.Drawing.Point(431, 67);
            this.lbl_tx.Name = "lbl_tx";
            this.lbl_tx.Size = new System.Drawing.Size(75, 15);
            this.lbl_tx.TabIndex = 136;
            this.lbl_tx.Text = "Tiền xăng:";
            this.lbl_tx.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // lbl_kh
            // 
            this.lbl_kh.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lbl_kh.ForeColor = System.Drawing.Color.DarkBlue;
            this.lbl_kh.Location = new System.Drawing.Point(0, 89);
            this.lbl_kh.Name = "lbl_kh";
            this.lbl_kh.Size = new System.Drawing.Size(56, 18);
            this.lbl_kh.TabIndex = 136;
            this.lbl_kh.Text = "PC khác:";
            this.lbl_kh.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.toolTip1.SetToolTip(this.lbl_kh, "8. Công tác phí \r\nÁp dụng đối với các đối tượng đi công tác");
            // 
            // lbl_pctdt
            // 
            this.lbl_pctdt.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lbl_pctdt.ForeColor = System.Drawing.Color.DarkBlue;
            this.lbl_pctdt.Location = new System.Drawing.Point(591, 69);
            this.lbl_pctdt.Name = "lbl_pctdt";
            this.lbl_pctdt.Size = new System.Drawing.Size(78, 13);
            this.lbl_pctdt.TabIndex = 135;
            this.lbl_pctdt.Text = "Tiền ĐT:";
            this.lbl_pctdt.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // lbl_dt
            // 
            this.lbl_dt.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lbl_dt.ForeColor = System.Drawing.Color.DarkBlue;
            this.lbl_dt.Location = new System.Drawing.Point(591, 44);
            this.lbl_dt.Name = "lbl_dt";
            this.lbl_dt.Size = new System.Drawing.Size(78, 13);
            this.lbl_dt.TabIndex = 135;
            this.lbl_dt.Text = "Đặc thù:";
            this.lbl_dt.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.toolTip1.SetToolTip(this.lbl_dt, "\r\n");
            // 
            // lbl_th
            // 
            this.lbl_th.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lbl_th.ForeColor = System.Drawing.Color.DarkBlue;
            this.lbl_th.Location = new System.Drawing.Point(5, 45);
            this.lbl_th.Name = "lbl_th";
            this.lbl_th.Size = new System.Drawing.Size(47, 13);
            this.lbl_th.TabIndex = 134;
            this.lbl_th.Text = "Thu hút:";
            this.lbl_th.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.toolTip1.SetToolTip(this.lbl_th, resources.GetString("lbl_th.ToolTip"));
            // 
            // txt_hsud
            // 
            this.txt_hsud.BackColor = System.Drawing.SystemColors.HighlightText;
            this.txt_hsud.Enabled = false;
            this.txt_hsud.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_hsud.ForeColor = System.Drawing.Color.Navy;
            this.txt_hsud.Location = new System.Drawing.Point(56, 64);
            this.txt_hsud.MaxLength = 8;
            this.txt_hsud.Name = "txt_hsud";
            this.txt_hsud.Size = new System.Drawing.Size(75, 22);
            this.txt_hsud.TabIndex = 10;
            this.txt_hsud.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            this.txt_hsud.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_hsud_KeyPress);
            this.txt_hsud.Validated += new System.EventHandler(this.txt_hsud_Validated);
            this.txt_hsud.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_hsud_KeyDown);
            // 
            // label8
            // 
            this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label8.ForeColor = System.Drawing.Color.DarkBlue;
            this.label8.Location = new System.Drawing.Point(133, 92);
            this.label8.Name = "label8";
            this.label8.Size = new System.Drawing.Size(74, 13);
            this.label8.TabIndex = 132;
            this.label8.Text = "Tổng cộng:";
            this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // lbl_tn
            // 
            this.lbl_tn.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lbl_tn.ForeColor = System.Drawing.Color.DarkBlue;
            this.lbl_tn.Location = new System.Drawing.Point(155, 69);
            this.lbl_tn.Name = "lbl_tn";
            this.lbl_tn.Size = new System.Drawing.Size(52, 13);
            this.lbl_tn.TabIndex = 132;
            this.lbl_tn.Text = "TN nghề:";
            this.lbl_tn.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.toolTip1.SetToolTip(this.lbl_tn, resources.GetString("lbl_tn.ToolTip"));
            // 
            // txt_hstn
            // 
            this.txt_hstn.BackColor = System.Drawing.SystemColors.HighlightText;
            this.txt_hstn.Enabled = false;
            this.txt_hstn.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_hstn.ForeColor = System.Drawing.Color.Navy;
            this.txt_hstn.Location = new System.Drawing.Point(208, 64);
            this.txt_hstn.MaxLength = 8;
            this.txt_hstn.Name = "txt_hstn";
            this.txt_hstn.Size = new System.Drawing.Size(72, 22);
            this.txt_hstn.TabIndex = 11;
            this.txt_hstn.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            this.txt_hstn.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_hstn_KeyPress);
            this.txt_hstn.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_hstn_KeyDown);
            // 
            // lbl_tldb
            // 
            this.lbl_tldb.AutoSize = true;
            this.lbl_tldb.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lbl_tldb.ForeColor = System.Drawing.Color.DarkRed;
            this.lbl_tldb.Location = new System.Drawing.Point(753, 16);
            this.lbl_tldb.Name = "lbl_tldb";
            this.lbl_tldb.Size = new System.Drawing.Size(18, 15);
            this.lbl_tldb.TabIndex = 131;
            this.lbl_tldb.Text = "%";
            this.lbl_tldb.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.lbl_tldb.Visible = false;
            // 
            // lbl_tlud
            // 
            this.lbl_tlud.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lbl_tlud.ForeColor = System.Drawing.Color.DarkRed;
            this.lbl_tlud.Location = new System.Drawing.Point(133, 67);
            this.lbl_tlud.Name = "lbl_tlud";
            this.lbl_tlud.Size = new System.Drawing.Size(18, 15);
            this.lbl_tlud.TabIndex = 131;
            this.lbl_tlud.Text = "%";
            this.lbl_tlud.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.lbl_tlud.Visible = false;
            // 
            // txt_pctx
            // 
            this.txt_pctx.BackColor = System.Drawing.SystemColors.HighlightText;
            this.txt_pctx.Enabled = false;
            this.txt_pctx.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_pctx.ForeColor = System.Drawing.Color.Navy;
            this.txt_pctx.Location = new System.Drawing.Point(506, 64);
            this.txt_pctx.MaxLength = 8;
            this.txt_pctx.Name = "txt_pctx";
            this.txt_pctx.Size = new System.Drawing.Size(78, 22);
            this.txt_pctx.TabIndex = 13;
            this.txt_pctx.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_pctx_KeyPress);
            this.txt_pctx.Validated += new System.EventHandler(this.txt_pctx_Validated);
            this.txt_pctx.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_pctx_KeyDown);
            // 
            // lbl_ud
            // 
            this.lbl_ud.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lbl_ud.ForeColor = System.Drawing.Color.DarkBlue;
            this.lbl_ud.Location = new System.Drawing.Point(10, 69);
            this.lbl_ud.Name = "lbl_ud";
            this.lbl_ud.Size = new System.Drawing.Size(42, 13);
            this.lbl_ud.TabIndex = 130;
            this.lbl_ud.Text = "Ưu đãi:";
            this.lbl_ud.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.toolTip1.SetToolTip(this.lbl_ud, resources.GetString("lbl_ud.ToolTip"));
            // 
            // txt_pckh
            // 
            this.txt_pckh.BackColor = System.Drawing.SystemColors.HighlightText;
            this.txt_pckh.Enabled = false;
            this.txt_pckh.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_pckh.ForeColor = System.Drawing.Color.Navy;
            this.txt_pckh.Location = new System.Drawing.Point(56, 89);
            this.txt_pckh.MaxLength = 8;
            this.txt_pckh.Name = "txt_pckh";
            this.txt_pckh.Size = new System.Drawing.Size(75, 22);
            this.txt_pckh.TabIndex = 15;
            this.toolTip1.SetToolTip(this.txt_pckh, "Phụ cấp khác");
            this.txt_pckh.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_pckh_KeyPress);
            this.txt_pckh.Validated += new System.EventHandler(this.txt_pckh_Validated);
            this.txt_pckh.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_pckh_KeyDown);
            // 
            // label22
            // 
            this.label22.AutoSize = true;
            this.label22.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label22.ForeColor = System.Drawing.Color.DarkBlue;
            this.label22.Location = new System.Drawing.Point(776, 22);
            this.label22.Name = "label22";
            this.label22.Size = new System.Drawing.Size(34, 13);
            this.label22.TabIndex = 127;
            this.label22.Text = "ĐT 2:";
            this.label22.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // lbl_ld
            // 
            this.lbl_ld.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lbl_ld.ForeColor = System.Drawing.Color.DarkBlue;
            this.lbl_ld.Location = new System.Drawing.Point(133, 40);
            this.lbl_ld.Name = "lbl_ld";
            this.lbl_ld.Size = new System.Drawing.Size(74, 17);
            this.lbl_ld.TabIndex = 121;
            this.lbl_ld.Text = "Lưu động:";
            this.lbl_ld.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.toolTip1.SetToolTip(this.lbl_ld, resources.GetString("lbl_ld.ToolTip"));
            // 
            // txt_hsld
            // 
            this.txt_hsld.BackColor = System.Drawing.SystemColors.HighlightText;
            this.txt_hsld.Enabled = false;
            this.txt_hsld.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_hsld.ForeColor = System.Drawing.Color.Navy;
            this.txt_hsld.Location = new System.Drawing.Point(208, 39);
            this.txt_hsld.MaxLength = 8;
            this.txt_hsld.Name = "txt_hsld";
            this.txt_hsld.Size = new System.Drawing.Size(72, 22);
            this.txt_hsld.TabIndex = 6;
            this.txt_hsld.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            this.txt_hsld.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_hsld_KeyPress);
            this.txt_hsld.Validated += new System.EventHandler(this.txt_hsld_Validated);
            this.txt_hsld.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_hsld_KeyDown);
            // 
            // txt_hsdb
            // 
            this.txt_hsdb.BackColor = System.Drawing.SystemColors.HighlightText;
            this.txt_hsdb.Enabled = false;
            this.txt_hsdb.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_hsdb.ForeColor = System.Drawing.Color.Navy;
            this.txt_hsdb.Location = new System.Drawing.Point(669, 15);
            this.txt_hsdb.MaxLength = 8;
            this.txt_hsdb.Name = "txt_hsdb";
            this.txt_hsdb.Size = new System.Drawing.Size(83, 22);
            this.txt_hsdb.TabIndex = 4;
            this.txt_hsdb.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            this.txt_hsdb.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_hsdb_KeyPress);
            this.txt_hsdb.Validated += new System.EventHandler(this.txt_hsdb_Validated);
            // 
            // txt_hskv
            // 
            this.txt_hskv.BackColor = System.Drawing.SystemColors.HighlightText;
            this.txt_hskv.Enabled = false;
            this.txt_hskv.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_hskv.ForeColor = System.Drawing.Color.Navy;
            this.txt_hskv.Location = new System.Drawing.Point(506, 40);
            this.txt_hskv.MaxLength = 8;
            this.txt_hskv.Name = "txt_hskv";
            this.txt_hskv.Size = new System.Drawing.Size(78, 22);
            this.txt_hskv.TabIndex = 8;
            this.txt_hskv.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            this.txt_hskv.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_hskv_KeyPress);
            this.txt_hskv.Validated += new System.EventHandler(this.txt_hskv_Validated);
            this.txt_hskv.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_hskv_KeyDown);
            // 
            // txt_hsdh
            // 
            this.txt_hsdh.BackColor = System.Drawing.SystemColors.HighlightText;
            this.txt_hsdh.Enabled = false;
            this.txt_hsdh.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_hsdh.ForeColor = System.Drawing.Color.Navy;
            this.txt_hsdh.Location = new System.Drawing.Point(347, 39);
            this.txt_hsdh.MaxLength = 8;
            this.txt_hsdh.Name = "txt_hsdh";
            this.txt_hsdh.Size = new System.Drawing.Size(78, 22);
            this.txt_hsdh.TabIndex = 7;
            this.txt_hsdh.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            this.txt_hsdh.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_hsdh_KeyPress);
            this.txt_hsdh.Validated += new System.EventHandler(this.txt_hsdh_Validated);
            this.txt_hsdh.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_hsdh_KeyDown);
            // 
            // txt_hsdt
            // 
            this.txt_hsdt.BackColor = System.Drawing.SystemColors.HighlightText;
            this.txt_hsdt.Enabled = false;
            this.txt_hsdt.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_hsdt.ForeColor = System.Drawing.Color.Navy;
            this.txt_hsdt.Location = new System.Drawing.Point(669, 39);
            this.txt_hsdt.MaxLength = 8;
            this.txt_hsdt.Name = "txt_hsdt";
            this.txt_hsdt.Size = new System.Drawing.Size(83, 22);
            this.txt_hsdt.TabIndex = 9;
            this.txt_hsdt.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            this.txt_hsdt.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_hsdt_KeyPress);
            this.txt_hsdt.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_hsdt_KeyDown);
            // 
            // lbl_tldt
            // 
            this.lbl_tldt.AutoSize = true;
            this.lbl_tldt.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lbl_tldt.ForeColor = System.Drawing.Color.DarkRed;
            this.lbl_tldt.Location = new System.Drawing.Point(753, 46);
            this.lbl_tldt.Name = "lbl_tldt";
            this.lbl_tldt.Size = new System.Drawing.Size(18, 15);
            this.lbl_tldt.TabIndex = 118;
            this.lbl_tldt.Text = "%";
            this.lbl_tldt.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.lbl_tldt.Visible = false;
            // 
            // txt_hsth
            // 
            this.txt_hsth.BackColor = System.Drawing.SystemColors.HighlightText;
            this.txt_hsth.Enabled = false;
            this.txt_hsth.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_hsth.ForeColor = System.Drawing.Color.Navy;
            this.txt_hsth.Location = new System.Drawing.Point(56, 39);
            this.txt_hsth.MaxLength = 8;
            this.txt_hsth.Name = "txt_hsth";
            this.txt_hsth.Size = new System.Drawing.Size(74, 22);
            this.txt_hsth.TabIndex = 5;
            this.txt_hsth.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            this.txt_hsth.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_hsth_KeyPress);
            this.txt_hsth.Validated += new System.EventHandler(this.txt_hsth_Validated);
            this.txt_hsth.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_hsth_KeyDown);
            // 
            // txt_pcta
            // 
            this.txt_pcta.BackColor = System.Drawing.SystemColors.HighlightText;
            this.txt_pcta.Enabled = false;
            this.txt_pcta.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_pcta.ForeColor = System.Drawing.Color.Navy;
            this.txt_pcta.Location = new System.Drawing.Point(347, 64);
            this.txt_pcta.MaxLength = 8;
            this.txt_pcta.Name = "txt_pcta";
            this.txt_pcta.Size = new System.Drawing.Size(78, 22);
            this.txt_pcta.TabIndex = 12;
            this.txt_pcta.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            this.txt_pcta.Validated += new System.EventHandler(this.txt_pcta_Validated);
            this.txt_pcta.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_pcta_KeyDown);
            // 
            // txt_hscv
            // 
            this.txt_hscv.BackColor = System.Drawing.SystemColors.HighlightText;
            this.txt_hscv.Enabled = false;
            this.txt_hscv.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_hscv.ForeColor = System.Drawing.Color.Navy;
            this.txt_hscv.Location = new System.Drawing.Point(506, 15);
            this.txt_hscv.MaxLength = 8;
            this.txt_hscv.Name = "txt_hscv";
            this.txt_hscv.Size = new System.Drawing.Size(78, 22);
            this.txt_hscv.TabIndex = 3;
            this.txt_hscv.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            this.txt_hscv.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_hscv_KeyPress);
            this.txt_hscv.Validated += new System.EventHandler(this.txt_hscv_Validated);
            this.txt_hscv.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_hscv_KeyDown);
            // 
            // txt_hesolc
            // 
            this.txt_hesolc.BackColor = System.Drawing.SystemColors.HighlightText;
            this.txt_hesolc.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_hesolc.ForeColor = System.Drawing.Color.Navy;
            this.txt_hesolc.Location = new System.Drawing.Point(56, 15);
            this.txt_hesolc.MaxLength = 4;
            this.txt_hesolc.Name = "txt_hesolc";
            this.txt_hesolc.ReadOnly = true;
            this.txt_hesolc.Size = new System.Drawing.Size(74, 22);
            this.txt_hesolc.TabIndex = 0;
            this.txt_hesolc.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            this.txt_hesolc.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_hesolc_KeyPress);
            this.txt_hesolc.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_hesolc_KeyDown);
            // 
            // lbl_cv
            // 
            this.lbl_cv.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lbl_cv.ForeColor = System.Drawing.Color.DarkBlue;
            this.lbl_cv.Location = new System.Drawing.Point(428, 18);
            this.lbl_cv.Name = "lbl_cv";
            this.lbl_cv.Size = new System.Drawing.Size(78, 13);
            this.lbl_cv.TabIndex = 51;
            this.lbl_cv.Text = "Chức vụ:";
            this.lbl_cv.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // txt_hsvk
            // 
            this.txt_hsvk.BackColor = System.Drawing.SystemColors.HighlightText;
            this.txt_hsvk.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_hsvk.ForeColor = System.Drawing.Color.Navy;
            this.txt_hsvk.Location = new System.Drawing.Point(208, 15);
            this.txt_hsvk.MaxLength = 3;
            this.txt_hsvk.Name = "txt_hsvk";
            this.txt_hsvk.Size = new System.Drawing.Size(72, 22);
            this.txt_hsvk.TabIndex = 1;
            this.txt_hsvk.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            this.txt_hsvk.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_hsvk_KeyPress);
            this.txt_hsvk.Validated += new System.EventHandler(this.txt_hsvk_Validated);
            this.txt_hsvk.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_hsvk_KeyDown);
            // 
            // txt_ngayvk
            // 
            this.txt_ngayvk.BackColor = System.Drawing.Color.White;
            this.txt_ngayvk.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_ngayvk.ForeColor = System.Drawing.Color.Navy;
            this.txt_ngayvk.Location = new System.Drawing.Point(347, 15);
            this.txt_ngayvk.Mask = "00/00/0000";
            this.txt_ngayvk.Name = "txt_ngayvk";
            this.txt_ngayvk.Size = new System.Drawing.Size(78, 22);
            this.txt_ngayvk.TabIndex = 2;
            this.txt_ngayvk.ValidatingType = typeof(System.DateTime);
            this.txt_ngayvk.Validated += new System.EventHandler(this.txt_ngayvk_Validated);
            this.txt_ngayvk.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_ngayvk_KeyDown);
            // 
            // lbl_tlvk
            // 
            this.lbl_tlvk.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lbl_tlvk.ForeColor = System.Drawing.Color.DarkRed;
            this.lbl_tlvk.Location = new System.Drawing.Point(280, 19);
            this.lbl_tlvk.Name = "lbl_tlvk";
            this.lbl_tlvk.Size = new System.Drawing.Size(18, 15);
            this.lbl_tlvk.TabIndex = 118;
            this.lbl_tlvk.Text = "%";
            this.lbl_tlvk.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.lbl_tlvk.Visible = false;
            // 
            // label66
            // 
            this.label66.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label66.ForeColor = System.Drawing.Color.DarkBlue;
            this.label66.Location = new System.Drawing.Point(12, 20);
            this.label66.Name = "label66";
            this.label66.Size = new System.Drawing.Size(40, 13);
            this.label66.TabIndex = 49;
            this.label66.Text = "Lương:";
            this.label66.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label68
            // 
            this.label68.AutoSize = true;
            this.label68.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label68.ForeColor = System.Drawing.Color.DarkBlue;
            this.label68.Location = new System.Drawing.Point(776, 41);
            this.label68.Name = "label68";
            this.label68.Size = new System.Drawing.Size(47, 13);
            this.label68.TabIndex = 119;
            this.label68.Text = "Thu hút:";
            this.label68.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // lbl_ta
            // 
            this.lbl_ta.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lbl_ta.ForeColor = System.Drawing.Color.DarkBlue;
            this.lbl_ta.Location = new System.Drawing.Point(283, 67);
            this.lbl_ta.Name = "lbl_ta";
            this.lbl_ta.Size = new System.Drawing.Size(63, 15);
            this.lbl_ta.TabIndex = 53;
            this.lbl_ta.Text = "Tiền ăn:";
            this.lbl_ta.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.toolTip1.SetToolTip(this.lbl_ta, resources.GetString("lbl_ta.ToolTip"));
            // 
            // lbl_db
            // 
            this.lbl_db.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lbl_db.ForeColor = System.Drawing.Color.DarkBlue;
            this.lbl_db.Location = new System.Drawing.Point(590, 19);
            this.lbl_db.Name = "lbl_db";
            this.lbl_db.Size = new System.Drawing.Size(79, 15);
            this.lbl_db.TabIndex = 123;
            this.lbl_db.Text = "PC đặc biệt:";
            this.lbl_db.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.toolTip1.SetToolTip(this.lbl_db, resources.GetString("lbl_db.ToolTip"));
            // 
            // lbl_kv
            // 
            this.lbl_kv.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lbl_kv.ForeColor = System.Drawing.Color.DarkBlue;
            this.lbl_kv.Location = new System.Drawing.Point(428, 43);
            this.lbl_kv.Name = "lbl_kv";
            this.lbl_kv.Size = new System.Drawing.Size(78, 14);
            this.lbl_kv.TabIndex = 55;
            this.lbl_kv.Text = "Pc khu vực:";
            this.lbl_kv.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.toolTip1.SetToolTip(this.lbl_kv, resources.GetString("lbl_kv.ToolTip"));
            // 
            // lbl_dh
            // 
            this.lbl_dh.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lbl_dh.ForeColor = System.Drawing.Color.DarkBlue;
            this.lbl_dh.Location = new System.Drawing.Point(283, 43);
            this.lbl_dh.Name = "lbl_dh";
            this.lbl_dh.Size = new System.Drawing.Size(63, 14);
            this.lbl_dh.TabIndex = 125;
            this.lbl_dh.Text = "Độc hại:";
            this.lbl_dh.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.toolTip1.SetToolTip(this.lbl_dh, resources.GetString("lbl_dh.ToolTip"));
            // 
            // lbl_vk
            // 
            this.lbl_vk.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lbl_vk.ForeColor = System.Drawing.Color.DarkBlue;
            this.lbl_vk.Location = new System.Drawing.Point(136, 18);
            this.lbl_vk.Name = "lbl_vk";
            this.lbl_vk.Size = new System.Drawing.Size(71, 15);
            this.lbl_vk.TabIndex = 57;
            this.lbl_vk.Text = "Vượt khung:";
            this.lbl_vk.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.toolTip1.SetToolTip(this.lbl_vk, " ");
            // 
            // label6
            // 
            this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label6.ForeColor = System.Drawing.Color.DarkBlue;
            this.label6.Location = new System.Drawing.Point(298, 15);
            this.label6.Name = "label6";
            this.label6.Size = new System.Drawing.Size(48, 17);
            this.label6.TabIndex = 99;
            this.label6.Text = "Ngày:";
            this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // chk_bhyt
            // 
            this.chk_bhyt.ForeColor = System.Drawing.Color.DarkBlue;
            this.chk_bhyt.Location = new System.Drawing.Point(248, 109);
            this.chk_bhyt.Margin = new System.Windows.Forms.Padding(3, 3, 1, 3);
            this.chk_bhyt.Name = "chk_bhyt";
            this.chk_bhyt.Size = new System.Drawing.Size(55, 17);
            this.chk_bhyt.TabIndex = 19;
            this.chk_bhyt.Text = "BHYT";
            this.chk_bhyt.KeyDown += new System.Windows.Forms.KeyEventHandler(this.chk_bhyt_KeyDown);
            // 
            // chk_bhxh
            // 
            this.chk_bhxh.ForeColor = System.Drawing.Color.DarkBlue;
            this.chk_bhxh.Location = new System.Drawing.Point(191, 109);
            this.chk_bhxh.Margin = new System.Windows.Forms.Padding(3, 3, 1, 3);
            this.chk_bhxh.Name = "chk_bhxh";
            this.chk_bhxh.Size = new System.Drawing.Size(56, 17);
            this.chk_bhxh.TabIndex = 18;
            this.chk_bhxh.Text = "BHXH";
            this.chk_bhxh.KeyDown += new System.Windows.Forms.KeyEventHandler(this.chk_bhxh_KeyDown);
            // 
            // txt_mltt
            // 
            this.txt_mltt.BackColor = System.Drawing.Color.White;
            this.txt_mltt.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_mltt.ForeColor = System.Drawing.Color.Red;
            this.txt_mltt.Location = new System.Drawing.Point(687, 54);
            this.txt_mltt.MaxLength = 10;
            this.txt_mltt.Name = "txt_mltt";
            this.txt_mltt.Size = new System.Drawing.Size(90, 22);
            this.txt_mltt.TabIndex = 12;
            this.txt_mltt.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            this.txt_mltt.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_mltt_KeyPress);
            this.txt_mltt.Validated += new System.EventHandler(this.txt_mltt_Validated);
            this.txt_mltt.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_mltt_KeyDown);
            // 
            // txt_ngayphep
            // 
            this.txt_ngayphep.BackColor = System.Drawing.Color.White;
            this.txt_ngayphep.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_ngayphep.ForeColor = System.Drawing.Color.Navy;
            this.txt_ngayphep.Location = new System.Drawing.Point(688, 129);
            this.txt_ngayphep.MaxLength = 3;
            this.txt_ngayphep.Name = "txt_ngayphep";
            this.txt_ngayphep.Size = new System.Drawing.Size(40, 22);
            this.txt_ngayphep.TabIndex = 25;
            this.txt_ngayphep.Text = "12";
            this.txt_ngayphep.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_ngayphep_KeyPress);
            this.txt_ngayphep.Validated += new System.EventHandler(this.txt_ngayphep_Validated);
            this.txt_ngayphep.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_ngayphep_KeyDown);
            // 
            // txt_luongcb
            // 
            this.txt_luongcb.BackColor = System.Drawing.Color.White;
            this.txt_luongcb.Enabled = false;
            this.txt_luongcb.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_luongcb.ForeColor = System.Drawing.Color.Red;
            this.txt_luongcb.Location = new System.Drawing.Point(107, 79);
            this.txt_luongcb.MaxLength = 10;
            this.txt_luongcb.Name = "txt_luongcb";
            this.txt_luongcb.ReadOnly = true;
            this.txt_luongcb.Size = new System.Drawing.Size(79, 22);
            this.txt_luongcb.TabIndex = 13;
            this.txt_luongcb.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            this.txt_luongcb.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_luongcb_KeyPress);
            this.txt_luongcb.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_luongcb_KeyDown);
            // 
            // cbo_ngachcc
            // 
            this.cbo_ngachcc.BackColor = System.Drawing.Color.White;
            this.cbo_ngachcc.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.cbo_ngachcc.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.cbo_ngachcc.ForeColor = System.Drawing.Color.Navy;
            this.cbo_ngachcc.Location = new System.Drawing.Point(107, 54);
            this.cbo_ngachcc.Name = "cbo_ngachcc";
            this.cbo_ngachcc.Size = new System.Drawing.Size(125, 22);
            this.cbo_ngachcc.TabIndex = 9;
            this.cbo_ngachcc.SelectedIndexChanged += new System.EventHandler(this.cbo_ngachcc_SelectedIndexChanged);
            this.cbo_ngachcc.KeyDown += new System.Windows.Forms.KeyEventHandler(this.cbo_ngachcc_KeyDown);
            // 
            // label60
            // 
            this.label60.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label60.ForeColor = System.Drawing.Color.DarkBlue;
            this.label60.Location = new System.Drawing.Point(588, 85);
            this.label60.Name = "label60";
            this.label60.Size = new System.Drawing.Size(97, 13);
            this.label60.TabIndex = 139;
            this.label60.Text = "Ngày hưởng lương:";
            this.label60.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // cbo_loaihd
            // 
            this.cbo_loaihd.BackColor = System.Drawing.Color.White;
            this.cbo_loaihd.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.cbo_loaihd.DropDownWidth = 120;
            this.cbo_loaihd.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.cbo_loaihd.ForeColor = System.Drawing.Color.Navy;
            this.cbo_loaihd.Location = new System.Drawing.Point(485, 6);
            this.cbo_loaihd.Name = "cbo_loaihd";
            this.cbo_loaihd.Size = new System.Drawing.Size(98, 22);
            this.cbo_loaihd.TabIndex = 3;
            this.cbo_loaihd.Validated += new System.EventHandler(this.cbo_loaihd_Validated);
            this.cbo_loaihd.SelectedIndexChanged += new System.EventHandler(this.cbo_loaihd_SelectedIndexChanged);
            this.cbo_loaihd.SelectedValueChanged += new System.EventHandler(this.cbo_loaihd_SelectedValueChanged);
            this.cbo_loaihd.KeyDown += new System.Windows.Forms.KeyEventHandler(this.cbo_loaihd_KeyDown);
            // 
            // num_sothanghd
            // 
            this.num_sothanghd.BackColor = System.Drawing.Color.White;
            this.num_sothanghd.Enabled = false;
            this.num_sothanghd.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.num_sothanghd.ForeColor = System.Drawing.Color.Navy;
            this.num_sothanghd.Location = new System.Drawing.Point(687, 6);
            this.num_sothanghd.Name = "num_sothanghd";
            this.num_sothanghd.Size = new System.Drawing.Size(50, 22);
            this.num_sothanghd.TabIndex = 4;
            this.num_sothanghd.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            this.num_sothanghd.Validated += new System.EventHandler(this.num_sothanghd_Validated);
            this.num_sothanghd.KeyDown += new System.Windows.Forms.KeyEventHandler(this.num_sothanghd_KeyDown);
            // 
            // label53
            // 
            this.label53.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label53.ForeColor = System.Drawing.Color.DarkBlue;
            this.label53.Location = new System.Drawing.Point(370, 59);
            this.label53.Name = "label53";
            this.label53.Size = new System.Drawing.Size(114, 14);
            this.label53.TabIndex = 133;
            this.label53.Text = "Ngày giữ bậc :";
            this.label53.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label57
            // 
            this.label57.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label57.ForeColor = System.Drawing.Color.DarkBlue;
            this.label57.Location = new System.Drawing.Point(587, 129);
            this.label57.Name = "label57";
            this.label57.Size = new System.Drawing.Size(98, 18);
            this.label57.TabIndex = 137;
            this.label57.Text = "Số ngày phép:";
            this.label57.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label61
            // 
            this.label61.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label61.ForeColor = System.Drawing.Color.DarkBlue;
            this.label61.Location = new System.Drawing.Point(3, 80);
            this.label61.Name = "label61";
            this.label61.Size = new System.Drawing.Size(103, 17);
            this.label61.TabIndex = 140;
            this.label61.Text = "Lương cơ bản:";
            this.label61.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label47
            // 
            this.label47.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label47.ForeColor = System.Drawing.Color.DarkBlue;
            this.label47.Location = new System.Drawing.Point(3, 58);
            this.label47.Name = "label47";
            this.label47.Size = new System.Drawing.Size(103, 14);
            this.label47.TabIndex = 131;
            this.label47.Text = "Ngạch công chức:";
            this.label47.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label58
            // 
            this.label58.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label58.ForeColor = System.Drawing.Color.DarkBlue;
            this.label58.Location = new System.Drawing.Point(372, 8);
            this.label58.Name = "label58";
            this.label58.Size = new System.Drawing.Size(111, 15);
            this.label58.TabIndex = 138;
            this.label58.Text = "Loại hợp đồng:";
            this.label58.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label54
            // 
            this.label54.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label54.ForeColor = System.Drawing.Color.DarkBlue;
            this.label54.Location = new System.Drawing.Point(8, 109);
            this.label54.Name = "label54";
            this.label54.Size = new System.Drawing.Size(98, 14);
            this.label54.TabIndex = 134;
            this.label54.Text = "Ngày tính BHXH:";
            this.label54.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label111
            // 
            this.label111.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label111.ForeColor = System.Drawing.Color.DarkBlue;
            this.label111.Location = new System.Drawing.Point(372, 30);
            this.label111.Name = "label111";
            this.label111.Size = new System.Drawing.Size(111, 18);
            this.label111.TabIndex = 141;
            this.label111.Text = "Đến ngày:";
            this.label111.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // txt_sohd
            // 
            this.txt_sohd.BackColor = System.Drawing.Color.White;
            this.txt_sohd.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_sohd.ForeColor = System.Drawing.Color.Navy;
            this.txt_sohd.Location = new System.Drawing.Point(267, 6);
            this.txt_sohd.MaxLength = 15;
            this.txt_sohd.Name = "txt_sohd";
            this.txt_sohd.Size = new System.Drawing.Size(97, 22);
            this.txt_sohd.TabIndex = 2;
            this.txt_sohd.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_sohd_KeyDown);
            // 
            // label55
            // 
            this.label55.AutoSize = true;
            this.label55.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label55.ForeColor = System.Drawing.Color.DarkBlue;
            this.label55.Location = new System.Drawing.Point(194, 8);
            this.label55.Name = "label55";
            this.label55.Size = new System.Drawing.Size(72, 13);
            this.label55.TabIndex = 135;
            this.label55.Text = "Số hợp đồng:";
            this.label55.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label169
            // 
            this.label169.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label169.ForeColor = System.Drawing.Color.DarkBlue;
            this.label169.Location = new System.Drawing.Point(587, 8);
            this.label169.Name = "label169";
            this.label169.Size = new System.Drawing.Size(98, 16);
            this.label169.TabIndex = 145;
            this.label169.Text = "Thời gian:";
            this.label169.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.toolTip1.SetToolTip(this.label169, "Số tháng hợp đồng");
            // 
            // txtTSo
            // 
            this.txtTSo.BackColor = System.Drawing.Color.White;
            this.txtTSo.Enabled = false;
            this.txtTSo.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtTSo.ForeColor = System.Drawing.Color.Red;
            this.txtTSo.Location = new System.Drawing.Point(80, 9);
            this.txtTSo.Name = "txtTSo";
            this.txtTSo.ReadOnly = true;
            this.txtTSo.Size = new System.Drawing.Size(64, 22);
            this.txtTSo.TabIndex = 0;
            this.txtTSo.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
            this.txtTSo.WordWrap = false;
            // 
            // label27
            // 
            this.label27.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label27.ForeColor = System.Drawing.Color.Blue;
            this.label27.Location = new System.Drawing.Point(13, 12);
            this.label27.Name = "label27";
            this.label27.Size = new System.Drawing.Size(68, 16);
            this.label27.TabIndex = 169;
            this.label27.Text = "TỔNG SỐ:";
            this.label27.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // panButLyLich
            // 
            this.panButLyLich.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.panButLyLich.Controls.Add(this.label37);
            this.panButLyLich.Controls.Add(this.txtLan);
            this.panButLyLich.Controls.Add(this.btn_in);
            this.panButLyLich.Controls.Add(this.btn_boqua);
            this.panButLyLich.Controls.Add(this.btn_sua);
            this.panButLyLich.Controls.Add(this.btn_them);
            this.panButLyLich.Controls.Add(this.btn_luu);
            this.panButLyLich.Controls.Add(this.btn_huy);
            this.panButLyLich.Controls.Add(this.btn_ketthuc);
            this.panButLyLich.Controls.Add(this.txtTSo);
            this.panButLyLich.Controls.Add(this.label27);
            this.panButLyLich.Dock = System.Windows.Forms.DockStyle.Bottom;
            this.panButLyLich.Location = new System.Drawing.Point(0, 528);
            this.panButLyLich.Name = "panButLyLich";
            this.panButLyLich.Size = new System.Drawing.Size(787, 43);
            this.panButLyLich.TabIndex = 25;
            // 
            // label37
            // 
            this.label37.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label37.ForeColor = System.Drawing.Color.DarkBlue;
            this.label37.Location = new System.Drawing.Point(704, 14);
            this.label37.Name = "label37";
            this.label37.Size = new System.Drawing.Size(36, 13);
            this.label37.TabIndex = 137;
            this.label37.Text = "Lần :";
            this.label37.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.toolTip1.SetToolTip(this.label37, resources.GetString("label37.ToolTip"));
            // 
            // txtLan
            // 
            this.txtLan.Enabled = false;
            this.txtLan.Location = new System.Drawing.Point(746, 10);
            this.txtLan.Name = "txtLan";
            this.txtLan.Size = new System.Drawing.Size(33, 20);
            this.txtLan.TabIndex = 207;
            // 
            // btn_in
            // 
            this.btn_in.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.btn_in.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(180)))));
            this.btn_in.Image = ((System.Drawing.Image)(resources.GetObject("btn_in.Image")));
            this.btn_in.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.btn_in.Location = new System.Drawing.Point(518, 6);
            this.btn_in.Name = "btn_in";
            this.btn_in.Size = new System.Drawing.Size(65, 28);
            this.btn_in.TabIndex = 170;
            this.btn_in.Text = "    &In";
            this.btn_in.UseVisualStyleBackColor = true;
            this.btn_in.Click += new System.EventHandler(this.butIn_Click);
            // 
            // btn_boqua
            // 
            this.btn_boqua.Enabled = false;
            this.btn_boqua.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.btn_boqua.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(180)))));
            this.btn_boqua.Image = ((System.Drawing.Image)(resources.GetObject("btn_boqua.Image")));
            this.btn_boqua.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.btn_boqua.Location = new System.Drawing.Point(442, 6);
            this.btn_boqua.Name = "btn_boqua";
            this.btn_boqua.Size = new System.Drawing.Size(70, 28);
            this.btn_boqua.TabIndex = 5;
            this.btn_boqua.Text = "&Bỏ qua";
            this.btn_boqua.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.btn_boqua.Click += new System.EventHandler(this.cmdCencel_Click);
            // 
            // btn_sua
            // 
            this.btn_sua.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.btn_sua.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(160)))));
            this.btn_sua.Image = ((System.Drawing.Image)(resources.GetObject("btn_sua.Image")));
            this.btn_sua.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.btn_sua.Location = new System.Drawing.Point(230, 6);
            this.btn_sua.Name = "btn_sua";
            this.btn_sua.Size = new System.Drawing.Size(65, 28);
            this.btn_sua.TabIndex = 4;
            this.btn_sua.Text = "     &Sửa";
            this.btn_sua.Click += new System.EventHandler(this.cmdSua_Click);
            // 
            // btn_them
            // 
            this.btn_them.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.btn_them.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(160)))));
            this.btn_them.Image = ((System.Drawing.Image)(resources.GetObject("btn_them.Image")));
            this.btn_them.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.btn_them.Location = new System.Drawing.Point(159, 6);
            this.btn_them.Name = "btn_them";
            this.btn_them.Size = new System.Drawing.Size(65, 28);
            this.btn_them.TabIndex = 3;
            this.btn_them.Text = "   &Thêm";
            this.btn_them.Click += new System.EventHandler(this.cmdThem_Click);
            // 
            // btn_luu
            // 
            this.btn_luu.Enabled = false;
            this.btn_luu.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.btn_luu.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(180)))));
            this.btn_luu.Image = ((System.Drawing.Image)(resources.GetObject("btn_luu.Image")));
            this.btn_luu.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.btn_luu.Location = new System.Drawing.Point(372, 6);
            this.btn_luu.Name = "btn_luu";
            this.btn_luu.Size = new System.Drawing.Size(65, 28);
            this.btn_luu.TabIndex = 0;
            this.btn_luu.Text = "     &Lưu";
            this.btn_luu.Click += new System.EventHandler(this.butThem_Click);
            // 
            // btn_huy
            // 
            this.btn_huy.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.btn_huy.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(180)))));
            this.btn_huy.Image = ((System.Drawing.Image)(resources.GetObject("btn_huy.Image")));
            this.btn_huy.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.btn_huy.Location = new System.Drawing.Point(301, 6);
            this.btn_huy.Name = "btn_huy";
            this.btn_huy.Size = new System.Drawing.Size(65, 28);
            this.btn_huy.TabIndex = 1;
            this.btn_huy.Text = "      &Hủy";
            this.btn_huy.Click += new System.EventHandler(this.butHuy_Click);
            // 
            // btn_ketthuc
            // 
            this.btn_ketthuc.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.btn_ketthuc.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(180)))));
            this.btn_ketthuc.Image = global::Human.Properties.Resources.close_r;
            this.btn_ketthuc.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.btn_ketthuc.Location = new System.Drawing.Point(587, 6);
            this.btn_ketthuc.Name = "btn_ketthuc";
            this.btn_ketthuc.Size = new System.Drawing.Size(75, 28);
            this.btn_ketthuc.TabIndex = 2;
            this.btn_ketthuc.Text = "&Kết thúc";
            this.btn_ketthuc.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.btn_ketthuc.Click += new System.EventHandler(this.butKetThuc_Click);
            // 
            // dtpNgayCapCMND
            // 
            this.dtpNgayCapCMND.Enabled = false;
            this.dtpNgayCapCMND.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.dtpNgayCapCMND.Location = new System.Drawing.Point(660, 547);
            this.dtpNgayCapCMND.Mask = "##/##/####";
            this.dtpNgayCapCMND.Name = "dtpNgayCapCMND";
            this.dtpNgayCapCMND.Size = new System.Drawing.Size(88, 23);
            this.dtpNgayCapCMND.TabIndex = 173;
            this.dtpNgayCapCMND.Text = "__/__/____";
            this.dtpNgayCapCMND.Visible = false;
            // 
            // cboBoPhan
            // 
            this.cboBoPhan.Location = new System.Drawing.Point(525, 544);
            this.cboBoPhan.MaxLength = 10;
            this.cboBoPhan.Name = "cboBoPhan";
            this.cboBoPhan.Size = new System.Drawing.Size(88, 20);
            this.cboBoPhan.TabIndex = 174;
            this.cboBoPhan.Visible = false;
            // 
            // cboChucVu
            // 
            this.cboChucVu.Location = new System.Drawing.Point(350, 544);
            this.cboChucVu.MaxLength = 10;
            this.cboChucVu.Name = "cboChucVu";
            this.cboChucVu.Size = new System.Drawing.Size(100, 20);
            this.cboChucVu.TabIndex = 175;
            this.cboChucVu.Visible = false;
            // 
            // cmdLuu_CT
            // 
            this.cmdLuu_CT.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.cmdLuu_CT.ForeColor = System.Drawing.Color.Blue;
            this.cmdLuu_CT.Location = new System.Drawing.Point(696, 560);
            this.cmdLuu_CT.Name = "cmdLuu_CT";
            this.cmdLuu_CT.Size = new System.Drawing.Size(48, 23);
            this.cmdLuu_CT.TabIndex = 62;
            this.cmdLuu_CT.Text = "Lưu";
            this.cmdLuu_CT.Visible = false;
            this.cmdLuu_CT.KeyDown += new System.Windows.Forms.KeyEventHandler(this.cmdLuu_CT_KeyDown);
            // 
            // cmdLuu_KT
            // 
            this.cmdLuu_KT.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.cmdLuu_KT.ForeColor = System.Drawing.Color.Blue;
            this.cmdLuu_KT.Location = new System.Drawing.Point(640, 568);
            this.cmdLuu_KT.Name = "cmdLuu_KT";
            this.cmdLuu_KT.Size = new System.Drawing.Size(48, 23);
            this.cmdLuu_KT.TabIndex = 62;
            this.cmdLuu_KT.Text = "Lưu";
            this.cmdLuu_KT.Visible = false;
            this.cmdLuu_KT.KeyDown += new System.Windows.Forms.KeyEventHandler(this.cmdLuu_KT_KeyDown);
            // 
            // cbo_hsbdhv
            // 
            this.cbo_hsbdhv.BackColor = System.Drawing.Color.White;
            this.cbo_hsbdhv.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.cbo_hsbdhv.ForeColor = System.Drawing.Color.Navy;
            this.cbo_hsbdhv.Location = new System.Drawing.Point(485, 104);
            this.cbo_hsbdhv.Name = "cbo_hsbdhv";
            this.cbo_hsbdhv.Size = new System.Drawing.Size(98, 22);
            this.cbo_hsbdhv.TabIndex = 21;
            this.toolTip1.SetToolTip(this.cbo_hsbdhv, "Hệ số bồi dưỡng hiện vật");
            this.cbo_hsbdhv.KeyDown += new System.Windows.Forms.KeyEventHandler(this.cbo_hsbdhv_KeyDown);
            // 
            // label7
            // 
            this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label7.ForeColor = System.Drawing.Color.DarkBlue;
            this.label7.Location = new System.Drawing.Point(587, 30);
            this.label7.Name = "label7";
            this.label7.Size = new System.Drawing.Size(98, 16);
            this.label7.TabIndex = 138;
            this.label7.Text = "Hình thức TD:";
            this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // cbo_tuyendung
            // 
            this.cbo_tuyendung.BackColor = System.Drawing.Color.White;
            this.cbo_tuyendung.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.cbo_tuyendung.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.cbo_tuyendung.ForeColor = System.Drawing.Color.Navy;
            this.cbo_tuyendung.Location = new System.Drawing.Point(687, 30);
            this.cbo_tuyendung.Name = "cbo_tuyendung";
            this.cbo_tuyendung.Size = new System.Drawing.Size(90, 22);
            this.cbo_tuyendung.TabIndex = 8;
            this.cbo_tuyendung.KeyDown += new System.Windows.Forms.KeyEventHandler(this.cbo_tuyendung_KeyDown);
            // 
            // label10
            // 
            this.label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label10.ForeColor = System.Drawing.Color.DarkBlue;
            this.label10.Location = new System.Drawing.Point(237, 59);
            this.label10.Name = "label10";
            this.label10.Size = new System.Drawing.Size(29, 13);
            this.label10.TabIndex = 201;
            this.label10.Text = "Bậc:";
            this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label11
            // 
            this.label11.ForeColor = System.Drawing.Color.DarkBlue;
            this.label11.Location = new System.Drawing.Point(587, 104);
            this.label11.Name = "label11";
            this.label11.Size = new System.Drawing.Size(97, 19);
            this.label11.TabIndex = 202;
            this.label11.Text = "Ghi chú:";
            this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // cbo_ghichu
            // 
            this.cbo_ghichu.BackColor = System.Drawing.Color.White;
            this.cbo_ghichu.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.cbo_ghichu.ForeColor = System.Drawing.Color.DarkBlue;
            this.cbo_ghichu.Location = new System.Drawing.Point(687, 104);
            this.cbo_ghichu.Name = "cbo_ghichu";
            this.cbo_ghichu.Size = new System.Drawing.Size(90, 22);
            this.cbo_ghichu.TabIndex = 22;
            this.cbo_ghichu.KeyDown += new System.Windows.Forms.KeyEventHandler(this.cbo_ghichu_KeyDown);
            // 
            // cbo_bac
            // 
            this.cbo_bac.BackColor = System.Drawing.Color.White;
            this.cbo_bac.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.cbo_bac.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.cbo_bac.ForeColor = System.Drawing.Color.DarkBlue;
            this.cbo_bac.Location = new System.Drawing.Point(267, 54);
            this.cbo_bac.Name = "cbo_bac";
            this.cbo_bac.Size = new System.Drawing.Size(97, 22);
            this.cbo_bac.TabIndex = 10;
            this.cbo_bac.Validated += new System.EventHandler(this.cbo_bac_Validated);
            this.cbo_bac.SelectedIndexChanged += new System.EventHandler(this.cbo_bac_SelectedIndexChanged);
            this.cbo_bac.KeyDown += new System.Windows.Forms.KeyEventHandler(this.cbo_bac_KeyDown);
            // 
            // chk_xemhsl
            // 
            this.chk_xemhsl.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(160)))));
            this.chk_xemhsl.Location = new System.Drawing.Point(320, 352);
            this.chk_xemhsl.Name = "chk_xemhsl";
            this.chk_xemhsl.Size = new System.Drawing.Size(164, 17);
            this.chk_xemhsl.TabIndex = 36;
            this.chk_xemhsl.Text = "Xem thông tin về hệ số lương";
            this.chk_xemhsl.CheckedChanged += new System.EventHandler(this.chk_xemhsl_CheckedChanged);
            this.chk_xemhsl.KeyDown += new System.Windows.Forms.KeyEventHandler(this.chk_xemhsl_KeyDown);
            // 
            // toolStrip3
            // 
            this.toolStrip3.AutoSize = false;
            this.toolStrip3.BackColor = System.Drawing.Color.Blue;
            this.toolStrip3.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.lblHD});
            this.toolStrip3.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow;
            this.toolStrip3.Location = new System.Drawing.Point(0, 0);
            this.toolStrip3.Name = "toolStrip3";
            this.toolStrip3.Size = new System.Drawing.Size(787, 36);
            this.toolStrip3.TabIndex = 208;
            this.toolStrip3.Text = "toolStrip3";
            // 
            // lblHD
            // 
            this.lblHD.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(160)))));
            this.lblHD.Font = new System.Drawing.Font("Tahoma", 15F, System.Drawing.FontStyle.Bold);
            this.lblHD.ForeColor = System.Drawing.Color.White;
            this.lblHD.Name = "lblHD";
            this.lblHD.Size = new System.Drawing.Size(145, 33);
            this.lblHD.Text = "HỢP ĐỒNG    ";
            // 
            // lblMasoNVCT
            // 
            this.lblMasoNVCT.BackColor = System.Drawing.Color.Blue;
            this.lblMasoNVCT.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lblMasoNVCT.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
            this.lblMasoNVCT.Location = new System.Drawing.Point(192, 2);
            this.lblMasoNVCT.Name = "lblMasoNVCT";
            this.lblMasoNVCT.Size = new System.Drawing.Size(63, 32);
            this.lblMasoNVCT.TabIndex = 209;
            this.lblMasoNVCT.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            // 
            // label28
            // 
            this.label28.BackColor = System.Drawing.Color.Blue;
            this.label28.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label28.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
            this.label28.Location = new System.Drawing.Point(138, 2);
            this.label28.Name = "label28";
            this.label28.Size = new System.Drawing.Size(56, 32);
            this.label28.TabIndex = 210;
            this.label28.Text = "Mã số";
            this.label28.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            // 
            // txtBac
            // 
            this.txtBac.ForeColor = System.Drawing.Color.Navy;
            this.txtBac.Location = new System.Drawing.Point(4, 541);
            this.txtBac.MaxLength = 2;
            this.txtBac.Name = "txtBac";
            this.txtBac.Size = new System.Drawing.Size(32, 20);
            this.txtBac.TabIndex = 6;
            this.txtBac.Visible = false;
            this.txtBac.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtBac_KeyPress);
            this.txtBac.Validated += new System.EventHandler(this.txtBac_Validated);
            this.txtBac.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBac_KeyDown);
            // 
            // pHanhchanh
            // 
            this.pHanhchanh.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.pHanhchanh.Controls.Add(this.chk_luongsp);
            this.pHanhchanh.Controls.Add(this.p_hdbantg);
            this.pHanhchanh.Controls.Add(this.txt_ghichuct);
            this.pHanhchanh.Controls.Add(this.groupDgcbcc);
            this.pHanhchanh.Controls.Add(this.label15);
            this.pHanhchanh.Controls.Add(this.num_sothangtbnh);
            this.pHanhchanh.Controls.Add(this.txt_sotienhd);
            this.pHanhchanh.Controls.Add(this.lbl_sotienhd);
            this.pHanhchanh.Controls.Add(this.chk_tbnghihuu);
            this.pHanhchanh.Controls.Add(this.label5);
            this.pHanhchanh.Controls.Add(this.txt_phepthem);
            this.pHanhchanh.Controls.Add(this.ng);
            this.pHanhchanh.Controls.Add(this.txt_nhluonghd);
            this.pHanhchanh.Controls.Add(this.txt_ngaykyhd);
            this.pHanhchanh.Controls.Add(this.cbo_hsbdhv);
            this.pHanhchanh.Controls.Add(this.label83);
            this.pHanhchanh.Controls.Add(this.label1);
            this.pHanhchanh.Controls.Add(this.dgrhsl);
            this.pHanhchanh.Controls.Add(this.txt_ngaynghi);
            this.pHanhchanh.Controls.Add(this.txt_ngaybhiem);
            this.pHanhchanh.Controls.Add(this.txt_ngaygiubac);
            this.pHanhchanh.Controls.Add(this.txt_ngayhuongluong);
            this.pHanhchanh.Controls.Add(this.txt_denngayhd);
            this.pHanhchanh.Controls.Add(this.txt_tungayhd);
            this.pHanhchanh.Controls.Add(this.txt_ngaydenct);
            this.pHanhchanh.Controls.Add(this.chk_xemttkl);
            this.pHanhchanh.Controls.Add(this.label72);
            this.pHanhchanh.Controls.Add(this.chk_xemttkt);
            this.pHanhchanh.Controls.Add(this.txt_sohd);
            this.pHanhchanh.Controls.Add(this.chk_xemhsl);
            this.pHanhchanh.Controls.Add(this.label73);
            this.pHanhchanh.Controls.Add(this.cbo_lydonghi);
            this.pHanhchanh.Controls.Add(this.num_sothanghd);
            this.pHanhchanh.Controls.Add(this.cbo_loaihd);
            this.pHanhchanh.Controls.Add(this.cbo_ngachcc);
            this.pHanhchanh.Controls.Add(this.label38);
            this.pHanhchanh.Controls.Add(this.label11);
            this.pHanhchanh.Controls.Add(this.txt_luongcb);
            this.pHanhchanh.Controls.Add(this.label111);
            this.pHanhchanh.Controls.Add(this.txt_ngayphep);
            this.pHanhchanh.Controls.Add(this.label46);
            this.pHanhchanh.Controls.Add(this.txt_mltt);
            this.pHanhchanh.Controls.Add(this.label47);
            this.pHanhchanh.Controls.Add(this.label77);
            this.pHanhchanh.Controls.Add(this.label10);
            this.pHanhchanh.Controls.Add(this.chk_bhxh);
            this.pHanhchanh.Controls.Add(this.label53);
            this.pHanhchanh.Controls.Add(this.chk_bhtn);
            this.pHanhchanh.Controls.Add(this.chk_bhyt);
            this.pHanhchanh.Controls.Add(this.label54);
            this.pHanhchanh.Controls.Add(this.label71);
            this.pHanhchanh.Controls.Add(this.label55);
            this.pHanhchanh.Controls.Add(this.cbo_tuyendung);
            this.pHanhchanh.Controls.Add(this.cbo_ghichu);
            this.pHanhchanh.Controls.Add(this.cbo_bac);
            this.pHanhchanh.Controls.Add(this.label32);
            this.pHanhchanh.Controls.Add(this.label169);
            this.pHanhchanh.Controls.Add(this.label61);
            this.pHanhchanh.Controls.Add(this.label60);
            this.pHanhchanh.Controls.Add(this.label58);
            this.pHanhchanh.Controls.Add(this.lbl_nhluonghd);
            this.pHanhchanh.Controls.Add(this.label7);
            this.pHanhchanh.Controls.Add(this.label59);
            this.pHanhchanh.Controls.Add(this.label57);
            this.pHanhchanh.Controls.Add(this.groupBox1);
            this.pHanhchanh.Controls.Add(this.p_thuviec);
            this.pHanhchanh.Dock = System.Windows.Forms.DockStyle.Fill;
            this.pHanhchanh.Location = new System.Drawing.Point(0, 36);
            this.pHanhchanh.Name = "pHanhchanh";
            this.pHanhchanh.Size = new System.Drawing.Size(787, 492);
            this.pHanhchanh.TabIndex = 211;
            // 
            // chk_luongsp
            // 
            this.chk_luongsp.AutoSize = true;
            this.chk_luongsp.ForeColor = System.Drawing.Color.DarkBlue;
            this.chk_luongsp.Location = new System.Drawing.Point(485, 157);
            this.chk_luongsp.Name = "chk_luongsp";
            this.chk_luongsp.Size = new System.Drawing.Size(105, 17);
            this.chk_luongsp.TabIndex = 27;
            this.chk_luongsp.Text = "Lương sản phẩm";
            this.chk_luongsp.UseVisualStyleBackColor = true;
            this.chk_luongsp.Visible = false;
            this.chk_luongsp.KeyDown += new System.Windows.Forms.KeyEventHandler(this.chk_luongsp_KeyDown);
            // 
            // p_hdbantg
            // 
            this.p_hdbantg.Controls.Add(this.label14);
            this.p_hdbantg.Controls.Add(this.lbl_sthdbantg);
            this.p_hdbantg.Controls.Add(this.txt_stbantg);
            this.p_hdbantg.Controls.Add(this.label12);
            this.p_hdbantg.Controls.Add(this.cbo_lhdbantg);
            this.p_hdbantg.Location = new System.Drawing.Point(3, 151);
            this.p_hdbantg.Name = "p_hdbantg";
            this.p_hdbantg.Size = new System.Drawing.Size(462, 28);
            this.p_hdbantg.TabIndex = 228;
            this.p_hdbantg.Visible = false;
            // 
            // label14
            // 
            this.label14.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label14.ForeColor = System.Drawing.Color.DarkRed;
            this.label14.Location = new System.Drawing.Point(439, 6);
            this.label14.Name = "label14";
            this.label14.Size = new System.Drawing.Size(18, 15);
            this.label14.TabIndex = 138;
            this.label14.Text = "đ";
            this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            // 
            // lbl_sthdbantg
            // 
            this.lbl_sthdbantg.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lbl_sthdbantg.ForeColor = System.Drawing.Color.DarkBlue;
            this.lbl_sthdbantg.Location = new System.Drawing.Point(188, 4);
            this.lbl_sthdbantg.Name = "lbl_sthdbantg";
            this.lbl_sthdbantg.Size = new System.Drawing.Size(145, 17);
            this.lbl_sthdbantg.TabIndex = 231;
            this.lbl_sthdbantg.Text = "Số tiền làm việc 1 giờ:";
            this.lbl_sthdbantg.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // txt_stbantg
            // 
            this.txt_stbantg.Enabled = false;
            this.txt_stbantg.Location = new System.Drawing.Point(339, 4);
            this.txt_stbantg.Name = "txt_stbantg";
            this.txt_stbantg.Size = new System.Drawing.Size(100, 20);
            this.txt_stbantg.TabIndex = 1;
            this.txt_stbantg.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_stbantg_KeyPress);
            this.txt_stbantg.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_stbantg_KeyDown);
            // 
            // label12
            // 
            this.label12.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label12.ForeColor = System.Drawing.Color.DarkBlue;
            this.label12.Location = new System.Drawing.Point(5, 7);
            this.label12.Name = "label12";
            this.label12.Size = new System.Drawing.Size(98, 14);
            this.label12.TabIndex = 229;
            this.label12.Text = "Hình thức làm việc:";
            this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // cbo_lhdbantg
            // 
            this.cbo_lhdbantg.Enabled = false;
            this.cbo_lhdbantg.FormattingEnabled = true;
            this.cbo_lhdbantg.Location = new System.Drawing.Point(104, 4);
            this.cbo_lhdbantg.Name = "cbo_lhdbantg";
            this.cbo_lhdbantg.Size = new System.Drawing.Size(79, 21);
            this.cbo_lhdbantg.TabIndex = 0;
            this.cbo_lhdbantg.SelectedIndexChanged += new System.EventHandler(this.cbo_lhdbantg_SelectedIndexChanged);
            this.cbo_lhdbantg.KeyDown += new System.Windows.Forms.KeyEventHandler(this.cbo_lhdbantg_KeyDown);
            // 
            // txt_ghichuct
            // 
            this.txt_ghichuct.Location = new System.Drawing.Point(687, 187);
            this.txt_ghichuct.Name = "txt_ghichuct";
            this.txt_ghichuct.Size = new System.Drawing.Size(91, 20);
            this.txt_ghichuct.TabIndex = 21;
            this.txt_ghichuct.Visible = false;
            this.txt_ghichuct.Validated += new System.EventHandler(this.txt_ghichuct_Validated);
            this.txt_ghichuct.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_ghichuct_KeyDown);
            // 
            // groupDgcbcc
            // 
            this.groupDgcbcc.Controls.Add(this.label18);
            this.groupDgcbcc.Controls.Add(this.label2);
            this.groupDgcbcc.Controls.Add(this.label16);
            this.groupDgcbcc.Controls.Add(this.label17);
            this.groupDgcbcc.Controls.Add(this.label19);
            this.groupDgcbcc.Controls.Add(this.label20);
            this.groupDgcbcc.Controls.Add(this.label21);
            this.groupDgcbcc.Controls.Add(this.label3);
            this.groupDgcbcc.Controls.Add(this.label4);
            this.groupDgcbcc.Controls.Add(this.label25);
            this.groupDgcbcc.Controls.Add(this.txtdg1);
            this.groupDgcbcc.Controls.Add(this.txtdg4);
            this.groupDgcbcc.Controls.Add(this.txtdg7);
            this.groupDgcbcc.Controls.Add(this.txtdg9);
            this.groupDgcbcc.Controls.Add(this.txtdg8);
            this.groupDgcbcc.Controls.Add(this.txtdg5);
            this.groupDgcbcc.Controls.Add(this.txtdg10);
            this.groupDgcbcc.Controls.Add(this.txtdg2);
            this.groupDgcbcc.Controls.Add(this.txtdg3);
            this.groupDgcbcc.Controls.Add(this.txtdg6);
            this.groupDgcbcc.Controls.Add(this.label26);
            this.groupDgcbcc.Controls.Add(this.txtdg11);
            this.groupDgcbcc.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.groupDgcbcc.ForeColor = System.Drawing.Color.Blue;
            this.groupDgcbcc.Location = new System.Drawing.Point(9, 366);
            this.groupDgcbcc.Name = "groupDgcbcc";
            this.groupDgcbcc.Size = new System.Drawing.Size(770, 120);
            this.groupDgcbcc.TabIndex = 227;
            this.groupDgcbcc.TabStop = false;
            this.groupDgcbcc.Text = "Đánh giá CBCC";
            // 
            // label18
            // 
            this.label18.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label18.ForeColor = System.Drawing.Color.DarkBlue;
            this.label18.Location = new System.Drawing.Point(7, 16);
            this.label18.Name = "label18";
            this.label18.Size = new System.Drawing.Size(236, 14);
            this.label18.TabIndex = 49;
            this.label18.Text = "Chấp hành chính sách pháp luật nhà nước";
            this.label18.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label2
            // 
            this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label2.ForeColor = System.Drawing.Color.DarkBlue;
            this.label2.Location = new System.Drawing.Point(315, 18);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(188, 12);
            this.label2.TabIndex = 49;
            this.label2.Text = "Kết quả công tác";
            this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label16
            // 
            this.label16.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label16.ForeColor = System.Drawing.Color.DarkBlue;
            this.label16.Location = new System.Drawing.Point(7, 43);
            this.label16.Name = "label16";
            this.label16.Size = new System.Drawing.Size(236, 18);
            this.label16.TabIndex = 49;
            this.label16.Text = "Tinh thần phối hợp trong công tác";
            this.label16.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label17
            // 
            this.label17.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label17.ForeColor = System.Drawing.Color.DarkBlue;
            this.label17.Location = new System.Drawing.Point(7, 71);
            this.label17.Name = "label17";
            this.label17.Size = new System.Drawing.Size(236, 17);
            this.label17.TabIndex = 49;
            this.label17.Text = "Tính trung thực trong công tác";
            this.label17.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label19
            // 
            this.label19.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label19.ForeColor = System.Drawing.Color.DarkBlue;
            this.label19.Location = new System.Drawing.Point(575, 19);
            this.label19.Name = "label19";
            this.label19.Size = new System.Drawing.Size(91, 13);
            this.label19.TabIndex = 49;
            this.label19.Text = "Lối sống đạo đức";
            this.label19.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label20
            // 
            this.label20.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label20.ForeColor = System.Drawing.Color.DarkBlue;
            this.label20.Location = new System.Drawing.Point(12, 96);
            this.label20.Name = "label20";
            this.label20.Size = new System.Drawing.Size(231, 19);
            this.label20.TabIndex = 49;
            this.label20.Text = "Tinh thần học tập nâng cao trình độ";
            this.label20.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label21
            // 
            this.label21.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label21.ForeColor = System.Drawing.Color.DarkBlue;
            this.label21.Location = new System.Drawing.Point(311, 48);
            this.label21.Name = "label21";
            this.label21.Size = new System.Drawing.Size(192, 13);
            this.label21.TabIndex = 49;
            this.label21.Text = "Tinh thần thái độ phục vụ nhân dân";
            this.label21.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label3
            // 
            this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label3.ForeColor = System.Drawing.Color.DarkBlue;
            this.label3.Location = new System.Drawing.Point(574, 48);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(92, 13);
            this.label3.TabIndex = 49;
            this.label3.Text = "Tự phong";
            this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label4
            // 
            this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label4.ForeColor = System.Drawing.Color.DarkBlue;
            this.label4.Location = new System.Drawing.Point(315, 75);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(188, 13);
            this.label4.TabIndex = 49;
            this.label4.Text = "Tập thể đánh giá";
            this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label25
            // 
            this.label25.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label25.ForeColor = System.Drawing.Color.DarkBlue;
            this.label25.Location = new System.Drawing.Point(318, 96);
            this.label25.Name = "label25";
            this.label25.Size = new System.Drawing.Size(185, 19);
            this.label25.TabIndex = 49;
            this.label25.Text = "Thủ trưởng đơn vị đánh giá";
            this.label25.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // txtdg1
            // 
            this.txtdg1.BackColor = System.Drawing.SystemColors.Control;
            this.txtdg1.Enabled = false;
            this.txtdg1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtdg1.ForeColor = System.Drawing.Color.DarkBlue;
            this.txtdg1.Location = new System.Drawing.Point(248, 12);
            this.txtdg1.Name = "txtdg1";
            this.txtdg1.Size = new System.Drawing.Size(61, 23);
            this.txtdg1.TabIndex = 0;
            // 
            // txtdg4
            // 
            this.txtdg4.BackColor = System.Drawing.SystemColors.Control;
            this.txtdg4.Enabled = false;
            this.txtdg4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtdg4.ForeColor = System.Drawing.Color.DarkBlue;
            this.txtdg4.Location = new System.Drawing.Point(248, 41);
            this.txtdg4.Name = "txtdg4";
            this.txtdg4.Size = new System.Drawing.Size(61, 23);
            this.txtdg4.TabIndex = 3;
            // 
            // txtdg7
            // 
            this.txtdg7.BackColor = System.Drawing.SystemColors.Control;
            this.txtdg7.Enabled = false;
            this.txtdg7.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtdg7.ForeColor = System.Drawing.Color.DarkBlue;
            this.txtdg7.Location = new System.Drawing.Point(248, 69);
            this.txtdg7.Name = "txtdg7";
            this.txtdg7.Size = new System.Drawing.Size(61, 23);
            this.txtdg7.TabIndex = 6;
            // 
            // txtdg9
            // 
            this.txtdg9.BackColor = System.Drawing.SystemColors.Control;
            this.txtdg9.Enabled = false;
            this.txtdg9.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtdg9.ForeColor = System.Drawing.Color.DarkBlue;
            this.txtdg9.Location = new System.Drawing.Point(248, 96);
            this.txtdg9.Name = "txtdg9";
            this.txtdg9.Size = new System.Drawing.Size(61, 23);
            this.txtdg9.TabIndex = 9;
            // 
            // txtdg8
            // 
            this.txtdg8.BackColor = System.Drawing.SystemColors.Control;
            this.txtdg8.Enabled = false;
            this.txtdg8.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtdg8.ForeColor = System.Drawing.Color.DarkBlue;
            this.txtdg8.Location = new System.Drawing.Point(507, 69);
            this.txtdg8.Name = "txtdg8";
            this.txtdg8.Size = new System.Drawing.Size(61, 23);
            this.txtdg8.TabIndex = 7;
            // 
            // txtdg5
            // 
            this.txtdg5.BackColor = System.Drawing.SystemColors.Control;
            this.txtdg5.Enabled = false;
            this.txtdg5.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtdg5.ForeColor = System.Drawing.Color.DarkBlue;
            this.txtdg5.Location = new System.Drawing.Point(507, 41);
            this.txtdg5.Name = "txtdg5";
            this.txtdg5.Size = new System.Drawing.Size(61, 23);
            this.txtdg5.TabIndex = 4;
            // 
            // txtdg10
            // 
            this.txtdg10.BackColor = System.Drawing.SystemColors.Control;
            this.txtdg10.Enabled = false;
            this.txtdg10.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtdg10.ForeColor = System.Drawing.Color.DarkBlue;
            this.txtdg10.Location = new System.Drawing.Point(507, 96);
            this.txtdg10.Name = "txtdg10";
            this.txtdg10.Size = new System.Drawing.Size(61, 23);
            this.txtdg10.TabIndex = 10;
            // 
            // txtdg2
            // 
            this.txtdg2.BackColor = System.Drawing.SystemColors.Control;
            this.txtdg2.Enabled = false;
            this.txtdg2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtdg2.ForeColor = System.Drawing.Color.DarkBlue;
            this.txtdg2.Location = new System.Drawing.Point(507, 12);
            this.txtdg2.Name = "txtdg2";
            this.txtdg2.Size = new System.Drawing.Size(61, 23);
            this.txtdg2.TabIndex = 1;
            // 
            // txtdg3
            // 
            this.txtdg3.BackColor = System.Drawing.SystemColors.Control;
            this.txtdg3.Enabled = false;
            this.txtdg3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtdg3.ForeColor = System.Drawing.Color.DarkBlue;
            this.txtdg3.Location = new System.Drawing.Point(672, 14);
            this.txtdg3.Name = "txtdg3";
            this.txtdg3.Size = new System.Drawing.Size(61, 23);
            this.txtdg3.TabIndex = 2;
            // 
            // txtdg6
            // 
            this.txtdg6.BackColor = System.Drawing.SystemColors.Control;
            this.txtdg6.Enabled = false;
            this.txtdg6.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtdg6.ForeColor = System.Drawing.Color.DarkBlue;
            this.txtdg6.Location = new System.Drawing.Point(672, 43);
            this.txtdg6.Name = "txtdg6";
            this.txtdg6.Size = new System.Drawing.Size(61, 23);
            this.txtdg6.TabIndex = 5;
            // 
            // label26
            // 
            this.label26.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label26.ForeColor = System.Drawing.Color.DarkBlue;
            this.label26.Location = new System.Drawing.Point(574, 75);
            this.label26.Name = "label26";
            this.label26.Size = new System.Drawing.Size(92, 13);
            this.label26.TabIndex = 49;
            this.label26.Text = "Kỷ luật";
            this.label26.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // txtdg11
            // 
            this.txtdg11.BackColor = System.Drawing.SystemColors.Control;
            this.txtdg11.Enabled = false;
            this.txtdg11.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtdg11.ForeColor = System.Drawing.Color.DarkBlue;
            this.txtdg11.Location = new System.Drawing.Point(672, 71);
            this.txtdg11.Name = "txtdg11";
            this.txtdg11.Size = new System.Drawing.Size(61, 23);
            this.txtdg11.TabIndex = 8;
            // 
            // label15
            // 
            this.label15.AutoSize = true;
            this.label15.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label15.ForeColor = System.Drawing.Color.DarkBlue;
            this.label15.Location = new System.Drawing.Point(431, 133);
            this.label15.Name = "label15";
            this.label15.Size = new System.Drawing.Size(53, 13);
            this.label15.TabIndex = 226;
            this.label15.Text = "Số tháng:";
            this.label15.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // num_sothangtbnh
            // 
            this.num_sothangtbnh.BackColor = System.Drawing.Color.White;
            this.num_sothangtbnh.Enabled = false;
            this.num_sothangtbnh.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.num_sothangtbnh.ForeColor = System.Drawing.Color.Navy;
            this.num_sothangtbnh.Location = new System.Drawing.Point(485, 129);
            this.num_sothangtbnh.Name = "num_sothangtbnh";
            this.num_sothangtbnh.Size = new System.Drawing.Size(48, 20);
            this.num_sothangtbnh.TabIndex = 24;
            this.num_sothangtbnh.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            this.num_sothangtbnh.KeyDown += new System.Windows.Forms.KeyEventHandler(this.num_sothangtbnh_KeyDown);
            // 
            // txt_sotienhd
            // 
            this.txt_sotienhd.BackColor = System.Drawing.Color.White;
            this.txt_sotienhd.Enabled = false;
            this.txt_sotienhd.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_sotienhd.ForeColor = System.Drawing.Color.Navy;
            this.txt_sotienhd.Location = new System.Drawing.Point(267, 80);
            this.txt_sotienhd.MaxLength = 15;
            this.txt_sotienhd.Name = "txt_sotienhd";
            this.txt_sotienhd.Size = new System.Drawing.Size(97, 22);
            this.txt_sotienhd.TabIndex = 14;
            this.txt_sotienhd.Text = "0";
            this.txt_sotienhd.Visible = false;
            this.txt_sotienhd.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_sotienhd_KeyPress);
            this.txt_sotienhd.Validated += new System.EventHandler(this.txt_sotienhd_Validated);
            this.txt_sotienhd.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_sotienhd_KeyDown);
            // 
            // lbl_sotienhd
            // 
            this.lbl_sotienhd.Enabled = false;
            this.lbl_sotienhd.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lbl_sotienhd.ForeColor = System.Drawing.Color.DarkBlue;
            this.lbl_sotienhd.Location = new System.Drawing.Point(201, 84);
            this.lbl_sotienhd.Name = "lbl_sotienhd";
            this.lbl_sotienhd.Size = new System.Drawing.Size(65, 13);
            this.lbl_sotienhd.TabIndex = 223;
            this.lbl_sotienhd.Text = "Số tiền HĐ :";
            this.lbl_sotienhd.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // chk_tbnghihuu
            // 
            this.chk_tbnghihuu.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(160)))));
            this.chk_tbnghihuu.Location = new System.Drawing.Point(107, 133);
            this.chk_tbnghihuu.Name = "chk_tbnghihuu";
            this.chk_tbnghihuu.Size = new System.Drawing.Size(295, 16);
            this.chk_tbnghihuu.TabIndex = 23;
            this.chk_tbnghihuu.Text = "Đã có thông báo nghỉ hưu được nâng lương trước hạn";
            this.chk_tbnghihuu.CheckedChanged += new System.EventHandler(this.chk_tbnghihuu_CheckedChanged);
            this.chk_tbnghihuu.KeyDown += new System.Windows.Forms.KeyEventHandler(this.chk_tbnghihuu_KeyDown);
            // 
            // label5
            // 
            this.label5.AutoSize = true;
            this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label5.ForeColor = System.Drawing.Color.DarkBlue;
            this.label5.Location = new System.Drawing.Point(728, 133);
            this.label5.Name = "label5";
            this.label5.Size = new System.Drawing.Size(13, 13);
            this.label5.TabIndex = 214;
            this.label5.Text = "+";
            this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // txt_phepthem
            // 
            this.txt_phepthem.BackColor = System.Drawing.Color.White;
            this.txt_phepthem.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_phepthem.ForeColor = System.Drawing.Color.Navy;
            this.txt_phepthem.Location = new System.Drawing.Point(744, 128);
            this.txt_phepthem.MaxLength = 3;
            this.txt_phepthem.Name = "txt_phepthem";
            this.txt_phepthem.Size = new System.Drawing.Size(33, 22);
            this.txt_phepthem.TabIndex = 26;
            this.txt_phepthem.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_phepthem_KeyPress);
            this.txt_phepthem.Validated += new System.EventHandler(this.txt_phepthem_Validated);
            this.txt_phepthem.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_phepthem_KeyDown);
            // 
            // ng
            // 
            this.ng.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.ng.ForeColor = System.Drawing.Color.DarkBlue;
            this.ng.Location = new System.Drawing.Point(3, 34);
            this.ng.Name = "ng";
            this.ng.Size = new System.Drawing.Size(103, 15);
            this.ng.TabIndex = 211;
            this.ng.Text = "Ngày ký HĐ:";
            this.ng.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // txt_nhluonghd
            // 
            this.txt_nhluonghd.BackColor = System.Drawing.Color.White;
            this.txt_nhluonghd.Enabled = false;
            this.txt_nhluonghd.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_nhluonghd.ForeColor = System.Drawing.Color.Navy;
            this.txt_nhluonghd.Location = new System.Drawing.Point(485, 79);
            this.txt_nhluonghd.Mask = "00/00/0000";
            this.txt_nhluonghd.Name = "txt_nhluonghd";
            this.txt_nhluonghd.Size = new System.Drawing.Size(98, 22);
            this.txt_nhluonghd.TabIndex = 15;
            this.txt_nhluonghd.ValidatingType = typeof(System.DateTime);
            this.txt_nhluonghd.Visible = false;
            this.txt_nhluonghd.Validated += new System.EventHandler(this.txt_nhluonghd_Validated);
            this.txt_nhluonghd.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_nhluonghd_KeyDown);
            // 
            // txt_ngaykyhd
            // 
            this.txt_ngaykyhd.BackColor = System.Drawing.Color.White;
            this.txt_ngaykyhd.Enabled = false;
            this.txt_ngaykyhd.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_ngaykyhd.ForeColor = System.Drawing.Color.Navy;
            this.txt_ngaykyhd.Location = new System.Drawing.Point(107, 30);
            this.txt_ngaykyhd.Mask = "00/00/0000";
            this.txt_ngaykyhd.Name = "txt_ngaykyhd";
            this.txt_ngaykyhd.Size = new System.Drawing.Size(79, 22);
            this.txt_ngaykyhd.TabIndex = 5;
            this.txt_ngaykyhd.ValidatingType = typeof(System.DateTime);
            this.txt_ngaykyhd.Validated += new System.EventHandler(this.txt_ngaykyhd_Validated);
            this.txt_ngaykyhd.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_ngaykyhd_KeyDown);
            // 
            // label83
            // 
            this.label83.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label83.ForeColor = System.Drawing.Color.DarkBlue;
            this.label83.Location = new System.Drawing.Point(360, 109);
            this.label83.Name = "label83";
            this.label83.Size = new System.Drawing.Size(125, 13);
            this.label83.TabIndex = 209;
            this.label83.Text = "Mức bồi dưỡng hiện vật :";
            this.label83.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label1
            // 
            this.label1.AutoSize = true;
            this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label1.ForeColor = System.Drawing.Color.DarkBlue;
            this.label1.Location = new System.Drawing.Point(360, 109);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(125, 13);
            this.label1.TabIndex = 209;
            this.label1.Text = "Mức bồi dưỡng hiện vật :";
            this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // dgrhsl
            // 
            this.dgrhsl.BackgroundColor = System.Drawing.Color.White;
            this.dgrhsl.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
            dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
            dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
            dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
            dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
            dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
            this.dgrhsl.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
            this.dgrhsl.ColumnHeadersHeight = 25;
            this.dgrhsl.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
            this.Column1,
            this.Column2,
            this.Column3,
            this.Column4,
            this.Column5,
            this.Column6,
            this.Column7,
            this.Column8,
            this.Column9,
            this.Column11,
            this.Column12,
            this.Column13,
            this.Column14,
            this.Column15,
            this.Column16,
            this.Column10});
            this.dgrhsl.Location = new System.Drawing.Point(9, 366);
            this.dgrhsl.Name = "dgrhsl";
            this.dgrhsl.RowHeadersWidth = 25;
            this.dgrhsl.Size = new System.Drawing.Size(770, 120);
            this.dgrhsl.TabIndex = 207;
            this.dgrhsl.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgrhsl_CellClick);
            // 
            // Column1
            // 
            this.Column1.DataPropertyName = "diengiai";
            this.Column1.HeaderText = "Loại HĐ";
            this.Column1.Name = "Column1";
            // 
            // Column2
            // 
            this.Column2.DataPropertyName = "m_tungay";
            this.Column2.HeaderText = "Từ Ngày";
            this.Column2.Name = "Column2";
            // 
            // Column3
            // 
            this.Column3.DataPropertyName = "m_denngay";
            this.Column3.HeaderText = "Đến Ngày";
            this.Column3.Name = "Column3";
            // 
            // Column4
            // 
            this.Column4.DataPropertyName = "hs_lc";
            this.Column4.HeaderText = "Hệ số lương";
            this.Column4.Name = "Column4";
            // 
            // Column5
            // 
            this.Column5.DataPropertyName = "hs_cv";
            this.Column5.HeaderText = "PC C.vụ";
            this.Column5.Name = "Column5";
            // 
            // Column6
            // 
            this.Column6.DataPropertyName = "hs_vk";
            this.Column6.HeaderText = "V.khung";
            this.Column6.Name = "Column6";
            // 
            // Column7
            // 
            this.Column7.DataPropertyName = "hs_tn";
            this.Column7.HeaderText = "PCT.Nhiệm";
            this.Column7.Name = "Column7";
            // 
            // Column8
            // 
            this.Column8.DataPropertyName = "hs_dh";
            this.Column8.HeaderText = "PC Đ.hại";
            this.Column8.Name = "Column8";
            // 
            // Column9
            // 
            this.Column9.DataPropertyName = "hs_dt";
            this.Column9.HeaderText = "PC Đ.thù ";
            this.Column9.Name = "Column9";
            // 
            // Column11
            // 
            this.Column11.DataPropertyName = "hs_ud";
            this.Column11.HeaderText = "Ưu đãi nghề";
            this.Column11.Name = "Column11";
            // 
            // Column12
            // 
            this.Column12.DataPropertyName = "hs_th";
            this.Column12.HeaderText = "HS thu hút";
            this.Column12.Name = "Column12";
            // 
            // Column13
            // 
            this.Column13.DataPropertyName = "hs_ld";
            this.Column13.HeaderText = "Hs lưu động";
            this.Column13.Name = "Column13";
            // 
            // Column14
            // 
            this.Column14.DataPropertyName = "hs_db";
            this.Column14.HeaderText = "Hs đặt biệt";
            this.Column14.Name = "Column14";
            // 
            // Column15
            // 
            this.Column15.DataPropertyName = "hs_kv";
            this.Column15.HeaderText = "PC Khu vực";
            this.Column15.Name = "Column15";
            // 
            // Column16
            // 
            this.Column16.DataPropertyName = "ghichu";
            this.Column16.HeaderText = "Ghi chú";
            this.Column16.Name = "Column16";
            // 
            // Column10
            // 
            this.Column10.DataPropertyName = "hs_dt1";
            this.Column10.HeaderText = "hs_dt1";
            this.Column10.Name = "Column10";
            this.Column10.Visible = false;
            // 
            // txt_ngaynghi
            // 
            this.txt_ngaynghi.BackColor = System.Drawing.Color.White;
            this.txt_ngaynghi.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_ngaynghi.Location = new System.Drawing.Point(105, 328);
            this.txt_ngaynghi.Mask = "00/00/0000";
            this.txt_ngaynghi.Name = "txt_ngaynghi";
            this.txt_ngaynghi.Size = new System.Drawing.Size(100, 22);
            this.txt_ngaynghi.TabIndex = 33;
            this.txt_ngaynghi.ValidatingType = typeof(System.DateTime);
            this.txt_ngaynghi.Validated += new System.EventHandler(this.txt_ngaynghi_Validated);
            this.txt_ngaynghi.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_ngaynghi_KeyDown);
            // 
            // txt_ngaybhiem
            // 
            this.txt_ngaybhiem.BackColor = System.Drawing.Color.White;
            this.txt_ngaybhiem.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_ngaybhiem.ForeColor = System.Drawing.Color.Navy;
            this.txt_ngaybhiem.Location = new System.Drawing.Point(107, 104);
            this.txt_ngaybhiem.Mask = "00/00/0000";
            this.txt_ngaybhiem.Name = "txt_ngaybhiem";
            this.txt_ngaybhiem.Size = new System.Drawing.Size(79, 22);
            this.txt_ngaybhiem.TabIndex = 17;
            this.txt_ngaybhiem.ValidatingType = typeof(System.DateTime);
            this.txt_ngaybhiem.Validated += new System.EventHandler(this.txt_ngaybhiem_Validated);
            this.txt_ngaybhiem.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_ngaybhiem_KeyDown);
            // 
            // txt_ngaygiubac
            // 
            this.txt_ngaygiubac.BackColor = System.Drawing.Color.White;
            this.txt_ngaygiubac.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_ngaygiubac.ForeColor = System.Drawing.Color.Navy;
            this.txt_ngaygiubac.Location = new System.Drawing.Point(485, 54);
            this.txt_ngaygiubac.Mask = "00/00/0000";
            this.txt_ngaygiubac.Name = "txt_ngaygiubac";
            this.txt_ngaygiubac.Size = new System.Drawing.Size(98, 22);
            this.txt_ngaygiubac.TabIndex = 11;
            this.txt_ngaygiubac.ValidatingType = typeof(System.DateTime);
            this.txt_ngaygiubac.Validated += new System.EventHandler(this.txt_ngaygiubac_Validated);
            this.txt_ngaygiubac.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_ngaygiubac_KeyDown);
            // 
            // txt_ngayhuongluong
            // 
            this.txt_ngayhuongluong.BackColor = System.Drawing.Color.White;
            this.txt_ngayhuongluong.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_ngayhuongluong.ForeColor = System.Drawing.Color.Navy;
            this.txt_ngayhuongluong.Location = new System.Drawing.Point(687, 80);
            this.txt_ngayhuongluong.Mask = "00/00/0000";
            this.txt_ngayhuongluong.Name = "txt_ngayhuongluong";
            this.txt_ngayhuongluong.Size = new System.Drawing.Size(90, 22);
            this.txt_ngayhuongluong.TabIndex = 16;
            this.txt_ngayhuongluong.ValidatingType = typeof(System.DateTime);
            this.txt_ngayhuongluong.Validated += new System.EventHandler(this.txt_ngayhuongluong_Validated);
            this.txt_ngayhuongluong.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_ngayhuongluong_KeyDown);
            // 
            // txt_denngayhd
            // 
            this.txt_denngayhd.BackColor = System.Drawing.Color.White;
            this.txt_denngayhd.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_denngayhd.ForeColor = System.Drawing.Color.Navy;
            this.txt_denngayhd.Location = new System.Drawing.Point(485, 30);
            this.txt_denngayhd.Mask = "00/00/0000";
            this.txt_denngayhd.Name = "txt_denngayhd";
            this.txt_denngayhd.Size = new System.Drawing.Size(98, 22);
            this.txt_denngayhd.TabIndex = 7;
            this.txt_denngayhd.ValidatingType = typeof(System.DateTime);
            this.txt_denngayhd.Validated += new System.EventHandler(this.txt_denngayhd_Validated);
            this.txt_denngayhd.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_denngayhd_KeyDown);
            // 
            // txt_tungayhd
            // 
            this.txt_tungayhd.BackColor = System.Drawing.Color.White;
            this.txt_tungayhd.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_tungayhd.ForeColor = System.Drawing.Color.Navy;
            this.txt_tungayhd.Location = new System.Drawing.Point(267, 30);
            this.txt_tungayhd.Mask = "00/00/0000";
            this.txt_tungayhd.Name = "txt_tungayhd";
            this.txt_tungayhd.Size = new System.Drawing.Size(97, 22);
            this.txt_tungayhd.TabIndex = 6;
            this.txt_tungayhd.ValidatingType = typeof(System.DateTime);
            this.txt_tungayhd.Validated += new System.EventHandler(this.txt_tungayhd_Validated);
            this.txt_tungayhd.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_tungayhd_KeyDown);
            // 
            // txt_ngaydenct
            // 
            this.txt_ngaydenct.BackColor = System.Drawing.Color.White;
            this.txt_ngaydenct.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_ngaydenct.ForeColor = System.Drawing.Color.Navy;
            this.txt_ngaydenct.Location = new System.Drawing.Point(107, 6);
            this.txt_ngaydenct.Mask = "00/00/0000";
            this.txt_ngaydenct.Name = "txt_ngaydenct";
            this.txt_ngaydenct.Size = new System.Drawing.Size(79, 22);
            this.txt_ngaydenct.TabIndex = 1;
            this.txt_ngaydenct.ValidatingType = typeof(System.DateTime);
            this.txt_ngaydenct.Validated += new System.EventHandler(this.txt_ngaydenct_Validated);
            this.txt_ngaydenct.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_ngaydenct_KeyDown);
            // 
            // label38
            // 
            this.label38.ForeColor = System.Drawing.Color.DarkBlue;
            this.label38.Location = new System.Drawing.Point(587, 182);
            this.label38.Name = "label38";
            this.label38.Size = new System.Drawing.Size(98, 23);
            this.label38.TabIndex = 202;
            this.label38.Text = "Ghi chú CT:";
            this.label38.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.label38.Visible = false;
            // 
            // label46
            // 
            this.label46.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label46.ForeColor = System.Drawing.Color.DarkBlue;
            this.label46.Location = new System.Drawing.Point(-5, 8);
            this.label46.Name = "label46";
            this.label46.Size = new System.Drawing.Size(111, 14);
            this.label46.TabIndex = 130;
            this.label46.Text = "Ngày đến công tác:";
            this.label46.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label77
            // 
            this.label77.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label77.ForeColor = System.Drawing.Color.DarkBlue;
            this.label77.Location = new System.Drawing.Point(191, 30);
            this.label77.Name = "label77";
            this.label77.Size = new System.Drawing.Size(75, 18);
            this.label77.TabIndex = 132;
            this.label77.Text = "Hiệu lực từ:";
            this.label77.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // chk_bhtn
            // 
            this.chk_bhtn.ForeColor = System.Drawing.Color.DarkBlue;
            this.chk_bhtn.Location = new System.Drawing.Point(304, 109);
            this.chk_bhtn.Margin = new System.Windows.Forms.Padding(3, 3, 1, 3);
            this.chk_bhtn.Name = "chk_bhtn";
            this.chk_bhtn.Size = new System.Drawing.Size(56, 17);
            this.chk_bhtn.TabIndex = 20;
            this.chk_bhtn.Text = "BHTN";
            this.chk_bhtn.KeyDown += new System.Windows.Forms.KeyEventHandler(this.chk_bhtn_KeyDown);
            // 
            // label71
            // 
            this.label71.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label71.ForeColor = System.Drawing.Color.DarkBlue;
            this.label71.Location = new System.Drawing.Point(191, 10);
            this.label71.Name = "label71";
            this.label71.Size = new System.Drawing.Size(75, 11);
            this.label71.TabIndex = 135;
            this.label71.Text = "Số hợp đồng:";
            this.label71.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label32
            // 
            this.label32.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label32.ForeColor = System.Drawing.Color.DarkBlue;
            this.label32.Location = new System.Drawing.Point(740, 11);
            this.label32.Name = "label32";
            this.label32.Size = new System.Drawing.Size(38, 13);
            this.label32.TabIndex = 145;
            this.label32.Text = "Tháng";
            this.label32.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // lbl_nhluonghd
            // 
            this.lbl_nhluonghd.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lbl_nhluonghd.ForeColor = System.Drawing.Color.DarkBlue;
            this.lbl_nhluonghd.Location = new System.Drawing.Point(370, 84);
            this.lbl_nhluonghd.Name = "lbl_nhluonghd";
            this.lbl_nhluonghd.Size = new System.Drawing.Size(114, 13);
            this.lbl_nhluonghd.TabIndex = 138;
            this.lbl_nhluonghd.Text = "Ngày hưởng LHĐ:";
            this.lbl_nhluonghd.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label59
            // 
            this.label59.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label59.ForeColor = System.Drawing.Color.DarkBlue;
            this.label59.Location = new System.Drawing.Point(587, 54);
            this.label59.Name = "label59";
            this.label59.Size = new System.Drawing.Size(99, 18);
            this.label59.TabIndex = 136;
            this.label59.Text = "Lương tối thiểu:";
            this.label59.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // p_thuviec
            // 
            this.p_thuviec.Controls.Add(this.l_ngaychinhthuc);
            this.p_thuviec.Controls.Add(this.txt_ngaychinhthuc);
            this.p_thuviec.Controls.Add(this.l_denngay);
            this.p_thuviec.Controls.Add(this.l_tungay);
            this.p_thuviec.Controls.Add(this.txt_denngaytv);
            this.p_thuviec.Controls.Add(this.txt_tungaytv);
            this.p_thuviec.Location = new System.Drawing.Point(3, 178);
            this.p_thuviec.Name = "p_thuviec";
            this.p_thuviec.Size = new System.Drawing.Size(580, 28);
            this.p_thuviec.TabIndex = 212;
            // 
            // l_ngaychinhthuc
            // 
            this.l_ngaychinhthuc.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.l_ngaychinhthuc.ForeColor = System.Drawing.Color.DarkBlue;
            this.l_ngaychinhthuc.Location = new System.Drawing.Point(371, 9);
            this.l_ngaychinhthuc.Name = "l_ngaychinhthuc";
            this.l_ngaychinhthuc.Size = new System.Drawing.Size(109, 13);
            this.l_ngaychinhthuc.TabIndex = 217;
            this.l_ngaychinhthuc.Text = "Ngày làm chính thức:";
            this.l_ngaychinhthuc.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // txt_ngaychinhthuc
            // 
            this.txt_ngaychinhthuc.BackColor = System.Drawing.Color.White;
            this.txt_ngaychinhthuc.Enabled = false;
            this.txt_ngaychinhthuc.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_ngaychinhthuc.ForeColor = System.Drawing.Color.Navy;
            this.txt_ngaychinhthuc.Location = new System.Drawing.Point(482, 4);
            this.txt_ngaychinhthuc.Mask = "00/00/0000";
            this.txt_ngaychinhthuc.Name = "txt_ngaychinhthuc";
            this.txt_ngaychinhthuc.Size = new System.Drawing.Size(98, 22);
            this.txt_ngaychinhthuc.TabIndex = 3;
            this.txt_ngaychinhthuc.ValidatingType = typeof(System.DateTime);
            this.txt_ngaychinhthuc.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_ngaychinhthuc_KeyDown);
            // 
            // l_denngay
            // 
            this.l_denngay.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.l_denngay.ForeColor = System.Drawing.Color.DarkBlue;
            this.l_denngay.Location = new System.Drawing.Point(208, 9);
            this.l_denngay.Name = "l_denngay";
            this.l_denngay.Size = new System.Drawing.Size(55, 13);
            this.l_denngay.TabIndex = 215;
            this.l_denngay.Text = "đến ngày:";
            this.l_denngay.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // l_tungay
            // 
            this.l_tungay.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.l_tungay.ForeColor = System.Drawing.Color.DarkBlue;
            this.l_tungay.Location = new System.Drawing.Point(13, 9);
            this.l_tungay.Name = "l_tungay";
            this.l_tungay.Size = new System.Drawing.Size(90, 13);
            this.l_tungay.TabIndex = 213;
            this.l_tungay.Text = "Thử việc từ ngày:";
            this.l_tungay.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // txt_denngaytv
            // 
            this.txt_denngaytv.BackColor = System.Drawing.Color.White;
            this.txt_denngaytv.Enabled = false;
            this.txt_denngaytv.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_denngaytv.ForeColor = System.Drawing.Color.Navy;
            this.txt_denngaytv.Location = new System.Drawing.Point(264, 4);
            this.txt_denngaytv.Mask = "00/00/0000";
            this.txt_denngaytv.Name = "txt_denngaytv";
            this.txt_denngaytv.Size = new System.Drawing.Size(97, 22);
            this.txt_denngaytv.TabIndex = 2;
            this.txt_denngaytv.ValidatingType = typeof(System.DateTime);
            this.txt_denngaytv.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_denngaytv_KeyDown);
            // 
            // txt_tungaytv
            // 
            this.txt_tungaytv.BackColor = System.Drawing.Color.White;
            this.txt_tungaytv.Enabled = false;
            this.txt_tungaytv.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_tungaytv.ForeColor = System.Drawing.Color.Navy;
            this.txt_tungaytv.Location = new System.Drawing.Point(104, 4);
            this.txt_tungaytv.Mask = "00/00/0000";
            this.txt_tungaytv.Name = "txt_tungaytv";
            this.txt_tungaytv.Size = new System.Drawing.Size(79, 22);
            this.txt_tungaytv.TabIndex = 1;
            this.txt_tungaytv.ValidatingType = typeof(System.DateTime);
            this.txt_tungaytv.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_tungaytv_KeyDown);
            // 
            // lblHoTenNVCT
            // 
            this.lblHoTenNVCT.BackColor = System.Drawing.Color.Blue;
            this.lblHoTenNVCT.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lblHoTenNVCT.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
            this.lblHoTenNVCT.Location = new System.Drawing.Point(321, 2);
            this.lblHoTenNVCT.Name = "lblHoTenNVCT";
            this.lblHoTenNVCT.Size = new System.Drawing.Size(272, 32);
            this.lblHoTenNVCT.TabIndex = 2;
            this.lblHoTenNVCT.Text = "Họ tên ";
            this.lblHoTenNVCT.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
            // 
            // frmHopDong
            // 
            this.AccessibleRole = System.Windows.Forms.AccessibleRole.None;
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(787, 571);
            this.Controls.Add(this.pHanhchanh);
            this.Controls.Add(this.lblTenPhongCT);
            this.Controls.Add(this.lblHoTenNVCT);
            this.Controls.Add(this.label29);
            this.Controls.Add(this.label28);
            this.Controls.Add(this.lblMasoNVCT);
            this.Controls.Add(this.toolStrip3);
            this.Controls.Add(this.panButLyLich);
            this.Controls.Add(this.cmdLuu_KT);
            this.Controls.Add(this.cmdLuu_CT);
            this.Controls.Add(this.txtBac);
            this.Controls.Add(this.cboChucVu);
            this.Controls.Add(this.cboBoPhan);
            this.Controls.Add(this.dtpNgayCapCMND);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.MaximizeBox = false;
            this.Name = "frmHopDong";
            this.ShowInTaskbar = false;
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "Hồ sơ nhân viên";
            this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.frmHopDong_MouseMove);
            this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.frmHopDong_KeyDown);
            this.Load += new System.EventHandler(this.frmHopDong_Load);
            this.groupBox1.ResumeLayout(false);
            this.groupBox1.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.num_sothanghd)).EndInit();
            this.panButLyLich.ResumeLayout(false);
            this.panButLyLich.PerformLayout();
            this.toolStrip3.ResumeLayout(false);
            this.toolStrip3.PerformLayout();
            this.pHanhchanh.ResumeLayout(false);
            this.pHanhchanh.PerformLayout();
            this.p_hdbantg.ResumeLayout(false);
            this.p_hdbantg.PerformLayout();
            this.groupDgcbcc.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.num_sothangtbnh)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.dgrhsl)).EndInit();
            this.p_thuviec.ResumeLayout(false);
            this.p_thuviec.PerformLayout();
            this.ResumeLayout(false);
            this.PerformLayout();

        }
        #endregion

        int fag = 0;
        private void frmHopDong_Load(object sender, EventArgs e)
        {
            s_mmyy = DateTime.Now.Month.ToString().PadLeft(2, '0') + DateTime.Now.Year.ToString().Substring(2, 2);
            dsxml_hopdong.ReadXml("..\\xml\\n_hdong_nvien.xml", XmlReadMode.Auto);
            foreach (DataColumn dc in dsxml_hopdong.Tables[0].Columns) n_filed_hopdong += dc.ColumnName + "+";
            luonghd = mDB.luonghd(s_mmyy);
            ngachdn = mDB.ngachdn(s_mmyy);
            hd_bantg = mDB.hd_bantg(s_mmyy);
            luong_sp = mDB.luong_sp(s_mmyy);
            //load thong so he so phu cap
            s_vk = mDB.h_hsvk(s_mmyy).Trim();
            s_stvk = mDB.h_stvk(s_mmyy).Trim();
            s_tlvk = mDB.h_tlvk(s_mmyy).Trim();
            s_cv = mDB.h_hscv(s_mmyy).Trim();
            s_stcv = mDB.h_stcv(s_mmyy).Trim();
            s_tlcv = mDB.h_tlcv(s_mmyy).Trim();
            s_db = mDB.h_hsdb(s_mmyy).Trim();
            s_stdb = mDB.h_stdb(s_mmyy).Trim();
            s_tldb = mDB.h_tldb(s_mmyy).Trim();
            s_dt = mDB.h_hsdt(s_mmyy).Trim();
            s_stdt = mDB.h_stdt(s_mmyy).Trim();
            s_tldt = mDB.h_tldt(s_mmyy).Trim();
            s_th = mDB.h_hsth(s_mmyy).Trim();
            s_stth = mDB.h_stth(s_mmyy).Trim();
            s_tlth = mDB.h_tlth(s_mmyy).Trim();
            s_ld = mDB.h_hsld(s_mmyy).Trim();
            s_stld = mDB.h_stld(s_mmyy).Trim();
            s_tlld = mDB.h_tlld(s_mmyy).Trim();
            s_dh = mDB.h_hsdh(s_mmyy).Trim();
            s_stdh = mDB.h_stdh(s_mmyy).Trim();
            s_tldh = mDB.h_tldh(s_mmyy).Trim();
            s_kv = mDB.h_hskv(s_mmyy).Trim();
            s_stkv = mDB.h_stkv(s_mmyy).Trim();
            s_tlkv = mDB.h_tlkv(s_mmyy).Trim();
            s_dt = mDB.h_hsdt(s_mmyy).Trim();
            s_stdt = mDB.h_stdt(s_mmyy).Trim();
            s_tldt = mDB.h_tldt(s_mmyy).Trim();
            s_ud = mDB.h_hsud(s_mmyy).Trim();
            s_stud = mDB.h_stud(s_mmyy).Trim();
            s_tlud = mDB.h_tlud(s_mmyy).Trim();
            s_tn = mDB.h_hstn(s_mmyy).Trim();
            s_sttn = mDB.h_sttn(s_mmyy).Trim();
            s_tltn = mDB.h_tltn(s_mmyy).Trim();
            s_ta = mDB.h_hsta(s_mmyy).Trim();
            s_stta = mDB.h_stta(s_mmyy).Trim();
            s_tlta = mDB.h_tlta(s_mmyy).Trim();
            s_tx = mDB.h_hstx(s_mmyy).Trim();
            s_sttx = mDB.h_sttx(s_mmyy).Trim();
            s_tltx = mDB.h_tltx(s_mmyy).Trim();
            s_tdt = mDB.h_hstdt(s_mmyy).Trim();
            s_sttdt = mDB.h_sttdt(s_mmyy).Trim();
            s_tltdt = mDB.h_tltdt(s_mmyy).Trim();
            s_kh = mDB.h_hskh(s_mmyy).Trim();
            s_stkh = mDB.h_stkh(s_mmyy).Trim();
            s_tlkh = mDB.h_tlkh(s_mmyy).Trim();

            Enabled_clt(false);
            bDgcbcc = mDB.bdg_cbcc();
            groupDgcbcc.Visible = bDgcbcc;
            DataRow r;
            dt_dgcb.Columns.Add("loai", typeof(string));
            r = dt_dgcb.NewRow();
            r["loai"] = lan.Change_language_MessageText("XS");
            dt_dgcb.Rows.Add(r);
            //
            r = dt_dgcb.NewRow();
            r["loai"] = lan.Change_language_MessageText("KHÁ");
            dt_dgcb.Rows.Add(r);
            //
            r = dt_dgcb.NewRow();
            r["loai"] = lan.Change_language_MessageText("TB");
            dt_dgcb.Rows.Add(r);
            //
            r = dt_dgcb.NewRow();
            r["loai"] = lan.Change_language_MessageText("KÉM");
            dt_dgcb.Rows.Add(r);
            if (bDgcbcc)
            {
                load_combodanhgia();
            }
            try
            {
                Load_LoaiHD();
                Load_NgachCongChuc();
                Load_DienGiai();
                load_heso();
                load_tuyendung();
                load_lhdbantg();
            }
            catch
            {
                MessageBox.Show(lan.Change_language_MessageText("Chưa có nhân viên này"), AccessData.Msg);
            }
            loadHD();
            tongso();
            fag = 0;
            enable_butt(true);
            if (txt_ngaydenct.Text.Trim() == "/  /")
            {
                btn_sua.Enabled = false;
                btn_huy.Enabled = false;
                btn_luu.Enabled = false;
                btn_in.Enabled = false;
            }
            else
            {
                btn_in.Enabled = true;
                btn_sua.Enabled = admin;
                btn_huy.Enabled = admin;
            }            
        }

        private bool IsNumeric(string strNum)
        {
            int iNum;
            try
            {
                iNum = int.Parse(strNum);
                return true;
            }
            catch
            {
                return false;
            }
        }

        private void tongso()
        {
            try
            {
                TSo = mDB.f_countNV().Tables[0].Rows[0][0].ToString();
                txtTSo.Text = "";
                txtTSo.Text = TSo.ToString();
            }
            catch { }
        }
        private bool kiemtra()
        {
            if (txt_ngaydenct.Text == "" || txt_ngaydenct.Text == "__/__/____")
            {
                MessageBox.Show(lan.Change_language_MessageText("Chưa nhập ngày đến công tác"), lan.Change_language_MessageText("Thông báo"));
                txt_ngaydenct.Focus();
                return false;
            }
            if (cbo_ngachcc.SelectedIndex == -1)
            {
                MessageBox.Show(lan.Change_language_MessageText("Yêu cầu chọn ngạch công chức"), lan.Change_language_MessageText("Thông báo"));
                cbo_ngachcc.Focus();
                return false;
            }
            if (txt_ngaygiubac.Text.Trim() == "" || txt_ngaygiubac.Text == "__/__/____")
            {
                MessageBox.Show(lan.Change_language_MessageText("Chưa nhập ngày giữ bậc lương mới nhất!"), lan.Change_language_MessageText("Thông báo"));
                txt_ngaygiubac.Focus();
                return false;
            }
            if (txt_mltt.Text == "")
            {
                MessageBox.Show(lan.Change_language_MessageText("Nhập mức lương tối thiểu"), lan.Change_language_MessageText("Thông báo"));
                txt_mltt.Focus();
                return false;
            }
            return true;
        }
        private void butThem_Click(object sender, System.EventArgs e)
        {
            try
            {
                if (!kiemtra()) return;
                txt_pckh_Validated(null, null);
                if (fag == 1 && !luunangbacluong())
                {
                    MessageBox.Show(lan.Change_language_MessageText("Không cập nhật được thay đổi bậc lương!"), AccessData.Msg, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    txt_ngaygiubac.Text = ngaygiubac;
                    cbo_bac.Text = bacluongcu;
                    return;
                }
                if (fag == 1 && !nangphucapvuotkhung())
                {
                    MessageBox.Show(lan.Change_language_MessageText("Không thay đổi được phụ cấp vượt khung "), AccessData.Msg, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    txt_ngayvk.Text = ngayquydinh;
                    txt_hsvk.Text = hs_cu;
                    return;
                }
                if (fag == 1 && !nangluonghopdong())
                {
                    MessageBox.Show(lan.Change_language_MessageText("Không thay đổi được tiền lương hợp đồng "), AccessData.Msg, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    txt_nhluonghd.Text = nglhd_cu;
                    txt_sotienhd.Text = sthd_cu.ToString();
                    return;
                }
                if (!capnhat_HD())
                {
                    MessageBox.Show(lan.Change_language_MessageText("Không cập nhật được thông tin hợp đồng!"), AccessData.Msg, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }
                loadHD();
                tongso();
                bEdit = true;
                enable_butt(true);
                btn_sua.Enabled = admin;
                btn_huy.Enabled = admin;
                Enabled_clt(false);
                btn_ketthuc.Focus();
            }
            catch (Exception ex)
            {
                _logger.Error("loi ", ex);
                btn_ketthuc.Focus(); 
            }
        }
        private void loadHD()
        {
            string n_manv = lblMasoNVCT.Text;
            try
            {
                dsxml_hopdong.Tables[0].Clear();
                DataRow r_add;
                try
                {
                    n_madv = (ds0.Tables[0].Rows.Count > 0) ? ds0.Tables[0].Rows[0]["madv"].ToString() : "";
                    n_macv = (ds0.Tables[0].Rows.Count > 0) ? ds0.Tables[0].Rows[0]["macv"].ToString() : "";
                }
                catch
                {
                }
                ds1 = mDB.get_hopdong(n_manv);
                DataRow[] ar = ds1.Tables[0].Select("manv = '" + n_manv + "'");
                if (ar != null)
                {
                    foreach (DataRow r in ar)
                    {
                        r_add = dsxml_hopdong.Tables[0].NewRow();
                        r_add["lan"] = txtLan.Text = r["lan"].ToString();
                        r_add["m_ngaydenct"] = txt_ngaydenct.Text = (r["m_ngaydenct"].ToString());
                        r_add["hdldso"] = txt_sohd.Text = r["hdldso"].ToString();
                        r_add["loaihd"] = cbo_loaihd.SelectedValue = r["loaihd"].ToString();
                        r_add["diengiai"] = r["diengiai"].ToString();
                        r_add["thoigian"] = num_sothanghd.Value = int.Parse(r["thoigian"].ToString());
                        r_add["mangach"] = cbo_ngachcc.SelectedValue = r["mangach"].ToString();
                        r_add["matd"] = cbo_tuyendung.SelectedValue = r["matd"].ToString();
                        r_add["m_tungay"] = txt_tungayhd.Text = (r["m_tungay"].ToString());
                        r_add["m_denngay"] = txt_denngayhd.Text = (r["m_denngay"].ToString());
                        r_add["m_s_begin"] = txt_ngayhuongluong.Text = (r["m_s_begin"].ToString());
                        r_add["m_ngaybnngach"] = txt_ngaygiubac.Text = (r["m_ngaybnngach"].ToString());
                        r_add["ngay_vk"] = txt_ngayvk.Text = (r["ngay_vk"].ToString());
                        r_add["bac"] = cbo_bac.SelectedValue = int.Parse(r["bac"].ToString());
                        r_add["magc"] = cbo_ghichu.SelectedValue = r["magc"].ToString();
                        decimal luong_hd = 0,st_bantg=0;
                        decimal luong_ct = 0;
                        decimal congtacphi = 0,sotien_hd=0,thuongkhac=0;
                        try
                        {
                            luong_hd = (r["luonghd"].ToString() != "") ? decimal.Parse(r["luonghd"].ToString()) : 0;
                            r_add["luonghd"] = txt_mltt.Text = luong_hd.ToString("#,###.###");
                            luong_ct = (r["luongct"].ToString() != "") ? decimal.Parse(r["luongct"].ToString()) : 0;
                            txt_luongcb.Text = luong_ct.ToString("#,###.###");
                            r_add["luongct"] = luong_ct;                            
                            thuongkhac = (r["pc_tx"].ToString() != "") ? decimal.Parse(r["pc_tx"].ToString()) : 0;
                            txt_pctx.Text = thuongkhac.ToString("#,###.###");
                            r_add["pc_tx"] = thuongkhac;
                            congtacphi = (r["pc_khac"].ToString() != "") ? decimal.Parse(r["pc_khac"].ToString()) : 0;
                            txt_pckh.Text = congtacphi.ToString("#,###.###");
                            r_add["pc_khac"] = congtacphi;
                            r_add["mangach"] = cbo_lhdbantg.SelectedValue = r["lhd_bantg"].ToString();
                            st_bantg = (r["st_bantg"].ToString() != "") ? decimal.Parse(r["st_bantg"].ToString()) : 0;
                            txt_stbantg.Text = st_bantg.ToString("#,###.###");
                            r_add["st_bantg"] = st_bantg;
                            chk_luongsp.Checked = r["luong_sp"].ToString() == "1";
                            r_add["luong_sp"] = r["luong_sp"].ToString();
                            sotien_hd = (r["sotien_hd"].ToString() != "") ? decimal.Parse(r["sotien_hd"].ToString()) : 0;
                            txt_sotienhd.Text = sotien_hd.ToString("#,###.###");
                            r_add["sotien_hd"] = sotien_hd;
                        }
                        catch { }
                        r_add["m_ngaybhxh"] = txt_ngaybhiem.Text = (r["m_ngaybhxh"].ToString());
                        decimal snp_hd = 0;
                        snp_hd = (r["sonphep"].ToString() != "") ? decimal.Parse(r["sonphep"].ToString()) : 0;
                        r_add["sonphep"] = txt_ngayphep.Text = snp_hd.ToString("0.#");
                        chk_bhyt.Checked = r["bhyt"].ToString() == "1";
                        r_add["bhyt"] = r["bhyt"].ToString();
                        chk_bhxh.Checked = r["bhxh"].ToString() == "1";
                        r_add["bhxh"] = r["bhxh"].ToString();
                        chk_bhtn.Checked = r["bhtn"].ToString() == "1";
                        r_add["bhtn"] = r["bhtn"].ToString();
                        decimal hs_lchd = 0;
                        hs_lchd = (r["hs_lc"].ToString() != "") ? decimal.Parse(r["hs_lc"].ToString()) : 0;
                        r_add["hs_lc"] = txt_hesolc.Text = hs_lchd.ToString("0.###");
                        decimal hs_cvhd = 0;
                        hs_cvhd = (r["hs_cv"].ToString() != "") ? decimal.Parse(r["hs_cv"].ToString()) : 0;
                        r_add["hs_cv"] = txt_hscv.Text = hs_cvhd.ToString("0.##");
                        decimal hs_tnhd = 0;
                        hs_tnhd = (r["hs_tn"].ToString() != "") ? decimal.Parse(r["hs_tn"].ToString()) : 0;
                        r_add["hs_tn"] = txt_hstn.Text = hs_tnhd.ToString("0.##");
                        decimal hs_kvhd = 0;
                        hs_kvhd = (r["hs_kv"].ToString() != "") ? decimal.Parse(r["hs_kv"].ToString()) : 0;
                        r_add["hs_kv"] = txt_hskv.Text = hs_kvhd.ToString("0.##");                      
                        decimal hs_dthd = 0;
                        decimal hs_pcta = 0,hs_pctdt=0;
                        decimal hs_ud = 0;
                        hs_dthd = (r["hs_dt"].ToString() != "") ? decimal.Parse(r["hs_dt"].ToString()) : 0;
                        r_add["hs_dt"] = txt_hsdt.Text = hs_dthd.ToString("0.##");

                        hs_pcta = (r["pc_ta"].ToString() != "") ? decimal.Parse(r["pc_ta"].ToString()) : 0;                        
                        txt_pcta.Text = hs_pcta.ToString("#,###.###");
                        r_add["pc_ta"] = hs_pcta;
                        hs_pctdt = (r["pc_tdt"].ToString() != "") ? decimal.Parse(r["pc_tdt"].ToString()) : 0;
                        txt_pctdt.Text = hs_pctdt.ToString("#,###.###");
                        r_add["pc_tdt"] = hs_pctdt;
                        hs_ud = (r["hs_ud"].ToString() != "") ? decimal.Parse(r["hs_ud"].ToString()) : 0;
                        r_add["hs_ud"] = txt_hsud.Text = hs_ud.ToString("0.##");
                        //
                        decimal hs_thhd = 0;
                        hs_thhd = (r["hs_th"].ToString() != "") ? decimal.Parse(r["hs_th"].ToString()) : 0;
                        r_add["hs_th"] = txt_hsth.Text = hs_thhd.ToString("0.##");
                        decimal hs_ldhd = 0;
                        hs_ldhd = (r["hs_ld"].ToString() != "") ? decimal.Parse(r["hs_ld"].ToString()) : 0;
                        r_add["hs_ld"] = txt_hsld.Text = hs_ldhd.ToString("0.##");
                        decimal hs_dbhd = 0;
                        hs_dbhd = (r["hs_db"].ToString() != "") ? decimal.Parse(r["hs_db"].ToString()) : 0;
                        r_add["hs_db"] = txt_hsdb.Text = hs_dbhd.ToString("0.##");
                        decimal hs_dhhd = 0;
                        hs_dhhd = (r["hs_dh"].ToString() != "") ? decimal.Parse(r["hs_dh"].ToString()) : 0;
                        r_add["hs_dh"] = txt_hsdh.Text = hs_dhhd.ToString("0.##");
                        decimal hs_vkhd = 0,tongluong=0;
                        hs_vkhd = (r["hs_vk"].ToString() != "") ? decimal.Parse(r["hs_vk"].ToString()) * 100 : 0;
                        r_add["hs_vk"] = txt_hsvk.Text = hs_vkhd.ToString("0.##");
                        tongluong = (r["tongluong"].ToString() != "") ? decimal.Parse(r["tongluong"].ToString()) : 0;
                        txt_tongcong.Text = tongluong.ToString("#,###.###");
                        r_add["tongluong"] = tongluong;
                        r_add["m_ngaynghi"] = txt_ngaynghi.Text = (r["m_ngaynghi"].ToString());
                        r_add["heso"] = cbo_hsbdhv.SelectedValue = r["heso"].ToString();
                        r_add["ld_nghiviec"] = cbo_lydonghi.SelectedValue = r["ld_nghiviec"].ToString();
                        r_add["lan"] = txtLan.Text = r["lan"].ToString();
                        //
                        r_add["m_ngayhd"] = txt_ngaykyhd.Text = r["m_ngayhd"].ToString();
                        r_add["ko_hoanthanh"] = r["ko_hoanthanh"].ToString();
                        r_add["bangkhen"] = r["bangkhen"].ToString();
                        r_add["thangnangluong"] = num_sothangtbnh.Value = decimal.Parse(r["thangnangluong"].ToString());
                        chk_tbnghihuu.Checked = r["tbnghihuu"].ToString() == "1";
                        r_add["tbnghihuu"] = r["tbnghihuu"].ToString();
                        r_add["phepthem"] = txt_phepthem.Text = r["phepthem"].ToString();
                        r_add["tvtn"] = txt_tungaytv.Text = r["TVTN"].ToString();
                        r_add["tvdn"] = txt_denngaytv.Text = r["TVDN"].ToString();
                        r_add["m_chinhthuc_lv"] = txt_ngaychinhthuc.Text = r["m_chinhthuc_lv"].ToString();
                        r_add["ghichuct"]=txt_ghichuct.Text=r["ghichuct"].ToString();
                        dsxml_hopdong.Tables[0].Rows.Add(r_add);
                    }
                }

                dgrhsl.DataSource = dsxml_hopdong.Tables[0];
                CurrencyManager cm = (CurrencyManager)BindingContext[dgrhsl.DataSource, dgrhsl.DataMember];
                DataView dv = (DataView)cm.List;
                dv.AllowDelete = false;
                dv.AllowEdit = false;
                dv.AllowNew = false;
                foreach (DataGridViewTextBoxColumn dc in dgrhsl.Columns) 
                    if (n_filed_hopdong.IndexOf(dc.Name + "+") > -1) 
                        dgrhsl.Columns[dc.Name].Visible = false;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
        private void butKetThuc_Click(object sender, System.EventArgs e)
        {
            this.Close();
        }
        private void goicb()
        {
            txt_ngaydenct.Text = ""; txt_sohd.Text = ""; cbo_loaihd.SelectedIndex = -1; num_sothanghd.Value = 0;
            cbo_ngachcc.SelectedIndex = -1;txt_tungayhd.Text = ""; txt_denngayhd.Text = ""; txt_ngayhuongluong.Text = "";
            txt_ngaygiubac.Text = ""; txt_mltt.Text = "0"; txt_luongcb.Text = "0";txt_ngaybhiem.Text = ""; txt_ngayphep.Text = "0";
            chk_bhxh.Checked = false; chk_bhyt.Checked = false; chk_bhtn.Checked = false;txt_hesolc.Text = "0"; txt_hscv.Text = "0";
            txt_pcta.Text = "0"; txt_hskv.Text = "0"; txt_pckh.Text = "0" ;txt_hsth.Text = "0"; txt_hsld.Text = "0"; txt_hsdb.Text = "0";
            txt_hsdh.Text = "0";txt_ngaynghi.Text = ""; cbo_lydonghi.SelectedIndex = -1;chk_xemttkt.Checked = false; chk_xemttkl.Checked = false;
            txt_hsdt.Text = "0"; txt_pckh.Text = "0"; txt_hstn.Text = "0";cbo_hsbdhv.SelectedIndex = -1; cbo_lhdbantg.SelectedIndex = -1;
            txt_stbantg.Text = "0"; chk_luongsp.Checked = false; txt_pctdt.Text = "0"; txt_tongcong.Text = "0";
        }
    
        private void enable_butt(bool ena)
        {
            btn_them.Enabled = ena;
            btn_boqua.Enabled = !ena;
            btn_sua.Enabled = admin;//ena;
            btn_huy.Enabled = admin;//ena;
            btn_luu.Enabled = !ena;
            btn_ketthuc.Enabled = ena;
        }
        private void Enabled_clt(bool ena)
        {
            txt_ngaydenct.Enabled = ena;
            txt_sohd.Enabled = ena;
            num_sothanghd.Enabled = ena;
            cbo_ngachcc.Enabled = ena;					
            cbo_tuyendung.Enabled = ena;
            txt_tungayhd.Enabled = ena;
            txt_denngayhd.Enabled = ena;
            num_sothangtbnh.Enabled = ena;
            txt_ngayhuongluong.Enabled = ena;
            txt_ngaygiubac.Enabled = ena;
            txt_ngayvk.Enabled = ena;
            cbo_bac.Enabled = ena;
            cbo_ghichu.Enabled = ena;
            txt_mltt.Enabled = ena;
            cbo_loaihd.Enabled = ena;
            txt_luongcb.Enabled = !ena;
            txt_ngaybhiem.Enabled = ena;
            txt_ngayphep.Enabled = ena;
            chk_bhyt.Enabled = ena;
            chk_bhxh.Enabled = ena;
            chk_bhtn.Enabled = ena;
            txt_hesolc.Enabled = ena;
            //txt_hsvk.Enabled = ena;
            if (s_vk.Trim() == "1")
            {
                lbl_vk.Enabled = ena;
                txt_hsvk.Enabled = ena;
                if (s_tlvk.Trim() == "1")
                {
                    lbl_tlvk.Visible = ena;
                    lbl_tlvk.Enabled = ena;
                }
            }
            if (s_cv.Trim() == "1")
            {
                lbl_cv.Enabled = ena;
                txt_hscv.Enabled = ena;                
            }
            if (s_db.Trim() == "1")
            {
                lbl_db.Enabled = ena;
                txt_hsdb.Enabled = ena;
                if (s_tldb.Trim() == "1")
                {
                    lbl_tldb.Visible = ena;
                    lbl_tldb.Enabled = ena;
                }
            }
            if (s_dt.Trim() == "1")
            {
                lbl_dt.Enabled = ena;
                txt_hsdt.Enabled = ena;
                if (s_tldt.Trim() == "1")
                {
                    lbl_tldt.Visible = ena;
                    lbl_tldt.Enabled = ena;
                }
            }
            if (s_th.Trim() == "1")
            {
                lbl_th.Enabled = ena;
                txt_hsth.Enabled = ena;
            }
            if (s_ld.Trim() == "1")
            {
                lbl_ld.Enabled = ena;
                txt_hsld.Enabled = ena;
            }
            if (s_dh.Trim() == "1")
            {
                lbl_dh.Enabled = ena;
                txt_hsdh.Enabled = ena;
            }
            if (s_kv.Trim() == "1")
            {
                lbl_kv.Enabled = ena;
                txt_hskv.Enabled = ena;
            }
            if (s_dt.Trim() == "1")
            {
                lbl_dt.Enabled = ena;
                txt_hsdt.Enabled = ena;
                if (s_tldt.Trim() == "1")
                {
                    lbl_tldt.Visible = ena;
                    lbl_tldt.Enabled = ena;
                }
            }
            if (s_ud.Trim() == "1")
            {
                lbl_ud.Enabled = ena;
                txt_hsud.Enabled = ena;
                if (s_tlud.Trim() == "1")
                {
                    lbl_tlud.Visible = ena;
                    lbl_tlud.Enabled = ena;
                }
            }
            if (s_tn.Trim() == "1")
            {
                lbl_tn.Enabled = ena;
                txt_hstn.Enabled = ena;
            }
            if (s_ta.Trim() == "1")
            {
                lbl_ta.Enabled = ena;
                txt_pcta.Enabled = ena;
            }
            if (s_tx.Trim() == "1")
            {
                lbl_tx.Enabled = ena;
                txt_pctx.Enabled = ena;
            }
            if (s_tdt.Trim() == "1")
            {
                lbl_pctdt.Enabled = ena;
                txt_pctdt.Enabled = ena;
            }
            if (s_kh.Trim() == "1")
            {
                lbl_kh.Enabled = ena;
                txt_pckh.Enabled = ena;
            }            
            txt_ngaynghi.Enabled = ena;
            cbo_lydonghi.Enabled = ena;
            cbo_hsbdhv.Enabled = ena;
            txt_ngaydenct.Enabled = ena;
            dgrhsl.Enabled = !ena;
            txt_ngaykyhd.Enabled = ena;
            txt_phepthem.Enabled = ena;
            chk_tbnghihuu.Enabled = ena;
            txt_ghichuct.Enabled = ena;
            if (luonghd == 1)
            {
                lbl_sotienhd.Visible = true;
                txt_sotienhd.Visible = true;
                lbl_nhluonghd.Visible = true;
                txt_nhluonghd.Visible = true;
                lbl_sotienhd.Enabled = ena;
                txt_sotienhd.Enabled = ena;
                lbl_nhluonghd.Enabled = ena;
                txt_nhluonghd.Enabled = ena;
            }
            if (hd_bantg == 1)
            {
                p_hdbantg.Visible = true;
                p_hdbantg.Enabled = ena;
                cbo_lhdbantg.Enabled = ena;
                txt_stbantg.Enabled = ena;
            }
            if (luong_sp == 1)
            {
                chk_luongsp.Visible = true;
                chk_luongsp.Enabled = ena;
            }
            if (bDgcbcc)
            {
                txtdg1.Enabled = ena;
                txtdg2.Enabled = ena;
                txtdg3.Enabled = ena;
                txtdg4.Enabled = ena;
                txtdg5.Enabled = ena;
                txtdg6.Enabled = ena;
                txtdg7.Enabled = ena;
                txtdg8.Enabled = ena;
                txtdg9.Enabled = ena;
                txtdg10.Enabled = ena;
                txtdg11.Enabled = ena;
            }
        }
        private void clear_text()
        {
            txt_sohd.Text = "";
            cbo_loaihd.SelectedIndex = -1;
            num_sothanghd.Value = 0;
            txt_ngaydenct.Text = "";
            txt_ngaykyhd.Text = "";
            cbo_ngachcc.SelectedIndex = -1;
            cbo_tuyendung.SelectedIndex = -1;
            txt_tungayhd.Text = "";
            txt_denngayhd.Text = "";
            txt_ngayhuongluong.Text = "";
            txt_ngaygiubac.Text = "";
            txt_ngayvk.Text = "";
            cbo_bac.SelectedIndex = -1;
            cbo_ghichu.SelectedIndex = -1;
            txt_mltt.Text = "0";
            txt_luongcb.Text = "";
            txt_ngaybhiem.Text = "";

            txt_ngayphep.Text = "0";
            chk_bhyt.Checked = false;
            chk_bhxh.Checked = false;
            chk_bhtn.Checked = false;
            txt_hesolc.Text = "0";
            txt_hsvk.Text = "0";
            txt_hscv.Text = "0";            
            txt_phepthem.Text = "0";

            txt_hskv.Text = "0";
            txt_hsdt.Text = "0";
            txt_hsud.Text = "0";
            txt_hstn.Text = "0";
            txt_hsth.Text = "0";
            txt_hsld.Text = "0";
            txt_hsdb.Text = "0";
            txt_hsdh.Text = "0";
            txt_pctx.Text = "0";
            txt_pcta.Text = "0";
            txt_pctdt.Text = "0";
            txt_pckh.Text = "0";
            
            txt_ngaynghi.Text = "";
            cbo_lydonghi.SelectedIndex = -1;
            cbo_hsbdhv.SelectedIndex = -1;
            txt_ngaydenct.Focus();
            txt_mltt.Text = mDB.pltoithieu().ToString("#,##0");
            txt_ghichuct.Text = "";
            txt_sotienhd.Text = "0";
            cbo_lhdbantg.SelectedIndex = -1;
            txt_stbantg.Text = "0";
            chk_luongsp.Checked = false;
            txt_tongcong.Text = "0";
            //
            if (bDgcbcc)
            {
                txtdg1.SelectedIndex = -1;
                txtdg2.SelectedIndex = -1;
                txtdg3.SelectedIndex = -1;
                txtdg4.SelectedIndex = -1;
                txtdg5.SelectedIndex = -1;
                txtdg6.SelectedIndex = -1;
                txtdg7.SelectedIndex = -1;
                txtdg8.SelectedIndex = -1;
                txtdg9.SelectedIndex = -1;
                txtdg10.SelectedIndex = -1;
                txtdg11.SelectedIndex = -1;
            }
        }
        private void load_combodanhgia()
        {
            txtdg1.DisplayMember = "loai";
            txtdg1.ValueMember = "loai";
            txtdg1.DataSource = dt_dgcb;
            txtdg1.SelectedIndex = -1;

            txtdg2.DisplayMember = "loai";
            txtdg2.ValueMember = "loai";
            txtdg2.DataSource = dt_dgcb.Copy();
            txtdg2.SelectedIndex = -1;

            txtdg3.DisplayMember = "loai";
            txtdg3.ValueMember = "loai";
            txtdg3.DataSource = dt_dgcb.Copy();
            txtdg3.SelectedIndex = -1;

            txtdg4.DisplayMember = "loai";
            txtdg4.ValueMember = "loai";
            txtdg4.DataSource = dt_dgcb.Copy();
            txtdg4.SelectedIndex = -1;

            txtdg5.DisplayMember = "loai";
            txtdg5.ValueMember = "loai";
            txtdg5.DataSource = dt_dgcb.Copy();
            txtdg5.SelectedIndex = -1;

            txtdg6.DisplayMember = "loai";
            txtdg6.ValueMember = "loai";
            txtdg6.DataSource = dt_dgcb.Copy();
            txtdg6.SelectedIndex = -1;

            txtdg7.DisplayMember = "loai";
            txtdg7.ValueMember = "loai";
            txtdg7.DataSource = dt_dgcb.Copy();
            txtdg7.SelectedIndex = -1;

            txtdg8.DisplayMember = "loai";
            txtdg8.ValueMember = "loai";
            txtdg8.DataSource = dt_dgcb.Copy();
            txtdg8.SelectedIndex = -1;

            txtdg9.DisplayMember = "loai";
            txtdg9.ValueMember = "loai";
            txtdg9.DataSource = dt_dgcb.Copy();
            txtdg9.SelectedIndex = -1;

            txtdg10.DisplayMember = "loai";
            txtdg10.ValueMember = "loai";
            txtdg10.DataSource = dt_dgcb.Copy();
            txtdg10.SelectedIndex = -1;

            txtdg11.DisplayMember = "loai";
            txtdg11.ValueMember = "loai";
            txtdg11.DataSource = dt_dgcb.Copy();
            txtdg11.SelectedIndex = -1;
        }
        
        private void load_tuyendung()
        {
            try
            {
                cbo_tuyendung.DisplayMember = "TEN";
                cbo_tuyendung.ValueMember = "MATD";
                cbo_tuyendung.DataSource = mDB.get_tuyendung().Tables[0];
                cbo_ghichu.DisplayMember = "ghichu";
                cbo_ghichu.ValueMember = "magc";
                cbo_ghichu.DataSource = mDB.get_data("select * from " + m_user + ".ghichu").Tables[0];
                cbo_ghichu.SelectedIndex = -1;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }

        public string getNDCT()
        {
            return ndct;
        }

        private bool capnhat_HD()
        {
            string n_hdldso = "", n_loaihd = "", n_ngaydenct = "", n_mangach = "", n_tungay = "", n_denngay = "", n_s_begin = "", n_ngayhd = "", n_ngaybhxh = ""
                , n_ngaynghi = "", n_lydonghi = "", n_matd = "", n_ngayvk = "", n_magc = "", n_heso = "", n_chinhthuc_lv = "", n_nam = "", n_ngay_phep = ""
                , n_tvtungay = "", n_tvdenngay = "", n_ngaygiubac = "",n_ngaygiulhd="",n_lhdbantg="";
            int n_tbnghihuu = 0, n_bangkhen = 0, n_phepthem = 0, n_ko_hoanthanh = 0;
            int n_bhxh = 0, n_bhyt = 0,n_bhtn=0, n_thangnangluong = 0, n_thaisan = 0, n_thoigian = 0, n_bac = 0, n_lan = 0, n_sonphep = 0,n_luongsp;
            decimal s_hs_lc = 0, n_hs_lc = 0, n_hs_cv = 0, n_hs_tn = 0, n_hs_kv = 0,n_pckh = 0,n_sotienhd=0,n_pctx=0,n_pctdt=0, n_hs_dt = 0, n_pcta = 0
                , ud = 0, n_hs_th = 0, n_hs_ld = 0, n_hs_db = 0, n_hs_dh = 0, n_luonghd = 0, n_luongct = 0,n_tongluong=0, n_hs_vk = 0,n_stbantg=0;
            bool gttv = false;
            string v_dg1 = "", v_dg2 = "", v_dg3 = "", v_dg4 = "", v_dg5 = "", v_dg6 = "", v_dg7 = "", v_dg8 = "", v_dg9 = "", v_dg10 = "", v_dg11 = "";
            string ghichuct = "";
            try
            {
                n_ngaydenct = txt_ngaydenct.Text.Trim() != "/  /" ? txt_ngaydenct.Text.Trim() : "";
                n_hdldso = txt_sohd.Text.Trim();
                n_loaihd = cbo_loaihd.SelectedIndex != -1 ? cbo_loaihd.SelectedValue.ToString() : "";
                n_thoigian = int.Parse(num_sothanghd.Value.ToString());
                n_mangach = cbo_ngachcc.SelectedIndex != -1 ? cbo_ngachcc.SelectedValue.ToString() : "";
                n_bac = cbo_bac.SelectedIndex != -1 ? int.Parse(cbo_bac.SelectedValue.ToString()) : 0; ;                
                n_matd = cbo_tuyendung.SelectedIndex != -1 ? cbo_tuyendung.SelectedValue.ToString() : "";
                n_ngayhd = txt_ngaykyhd.Text.Trim() != "/  /" ? txt_ngaykyhd.Text.Trim() : "";
                n_tungay = txt_tungayhd.Text.Trim() != "/  /" ? txt_tungayhd.Text.Trim() : "";
                n_denngay = txt_denngayhd.Text.Trim() != "/  /" ? txt_denngayhd.Text.Trim() : "";
                n_s_begin = txt_ngayhuongluong.Text.Trim() != "/  /" ? txt_ngayhuongluong.Text.Trim() : "";
                n_ngaygiubac = txt_ngaygiubac.Text.Trim() != "/  /" ? txt_ngaygiubac.Text.Trim() : "";
                n_luonghd = txt_mltt.Text.Trim() != "" ? decimal.Parse(txt_mltt.Text.Trim()) : 0;
                n_luongct = txt_luongcb.Text.Trim() != "" ? decimal.Parse(txt_luongcb.Text.Trim()) : 0;
                n_ngayvk = txt_ngayvk.Text.Trim() != "/  /" ? txt_ngayvk.Text.Trim() : "";
                n_ngaybhxh = txt_ngaybhiem.Text.Trim() != "/  /" ? txt_ngaybhiem.Text.Trim() : "";
                n_bhxh = (chk_bhxh.Checked == true) ? 1 : 0;
                n_bhyt = (chk_bhyt.Checked == true) ? 1 : 0;
                n_bhtn = (chk_bhtn.Checked == true) ? 1 : 0;
                n_heso = cbo_hsbdhv.SelectedIndex != -1 ? cbo_hsbdhv.SelectedValue.ToString() : "";
                n_magc = cbo_ghichu.SelectedIndex != -1 ? cbo_ghichu.SelectedValue.ToString() : "";
                n_sonphep = txt_ngayphep.Text.Trim() != "" ? int.Parse(txt_ngayphep.Text.Trim()) : 0;
                n_phepthem = txt_phepthem.Text.Trim() != "" ? int.Parse(txt_phepthem.Text.Trim()) : 0;

                n_hs_lc = (txt_hesolc.Text.ToString().Trim() == "") ? 0 : decimal.Parse(txt_hesolc.Text.ToString());
                n_hs_vk = (txt_hsvk.Text.Trim() == "") ? 0 : Math.Round(decimal.Parse(txt_hsvk.Text.Trim()) / 100, 3);
                n_hs_cv = (txt_hscv.Text.ToString() == "") ? 0 : decimal.Parse(txt_hscv.Text.ToString());
                if (s_tldb == "1")
                {
                    n_hs_db = (txt_hsdb.Text.ToString() == "") ? 0 : Math.Round(decimal.Parse(txt_hsdb.Text.ToString())/100,2);
                }
                else
                {
                    n_hs_db = (txt_hsdb.Text.ToString() == "") ? 0 : decimal.Parse(txt_hsdb.Text.ToString());
                }
                n_hs_th = (txt_hsth.Text.ToString() == "") ? 0 : decimal.Parse(txt_hsth.Text.ToString());
                n_hs_ld = (txt_hsld.Text.ToString() == "") ? 0 : decimal.Parse(txt_hsld.Text.ToString());
                n_hs_dh = (txt_hsdh.Text.ToString() == "") ? 0 : decimal.Parse(txt_hsdh.Text.ToString());
                n_hs_kv = (txt_hskv.Text.ToString() == "") ? 0 : decimal.Parse(txt_hskv.Text.ToString());
                if (s_tldt.Trim() == "1")
                {
                    n_hs_dt = (txt_hsdt.Text.ToString() == "") ? 0 : Math.Round(decimal.Parse(txt_hsdt.Text.ToString()) / 100, 2);
                }
                else
                {
                    n_hs_dt = (txt_hsdt.Text.ToString() == "") ? 0 : decimal.Parse(txt_hsdt.Text.ToString());
                }
                ud = (txt_hsud.Text.ToString() == "") ? 0 : decimal.Parse(txt_hsud.Text.ToString());
                n_hs_tn = (txt_hstn.Text.ToString() == "") ? 0 : decimal.Parse(txt_hstn.Text.ToString());                
                n_ngaygiulhd = txt_nhluonghd.Text.Trim() != "/  /" ? txt_nhluonghd.Text.Trim() : "";
                n_sotienhd = txt_sotienhd.Text.Trim() != "" ? decimal.Parse(txt_sotienhd.Text.Trim()) : 0;
                n_ngaynghi = (txt_ngaynghi.Text.Trim() != "/  /") ? txt_ngaynghi.Text.Trim() : "";
                n_lydonghi = (cbo_lydonghi.SelectedIndex == -1) ? "" : cbo_lydonghi.SelectedValue.ToString();
                n_lhdbantg = cbo_lhdbantg.SelectedIndex!=-1 ? cbo_lhdbantg.SelectedValue.ToString().Trim():"";
                n_stbantg = txt_stbantg.Text.Trim() != "" ? decimal.Parse(txt_stbantg.Text.Trim()) : 0;
                n_luongsp = (chk_luongsp.Checked==true) ? 1 : 0;
                n_pcta = (txt_pcta.Text.ToString() == "") ? 0 : decimal.Parse(txt_pcta.Text.ToString());
                n_pctx = txt_pctx.Text.Trim() != "" ? decimal.Parse(txt_pctx.Text.Trim()) : 0;
                n_pctdt = txt_pctdt.Text.Trim() != "" ? decimal.Parse(txt_pctdt.Text.Trim()) : 0;
                n_pckh = txt_pckh.Text.Trim() != "" ? decimal.Parse(txt_pckh.Text.Trim()) : 0;
                n_tongluong = txt_tongcong.Text.Trim() != "" ? decimal.Parse(txt_tongcong.Text.Trim()) : 0;
                DataSet dsdm = new DataSet();
                decimal hs_cvhd1 = 0;
                decimal hs_dhhd1, hs_dbhd1, hs_ldhd1, hs_thhd1, hs_kvhd1,hs_congtacphihd1, hs_vkhd;
                hs_dhhd1 = 0; hs_dbhd1 = 0; hs_ldhd1 = 0; hs_thhd1 = 0; hs_kvhd1 = 0; hs_congtacphihd1 = 0; hs_vkhd = 0;
                string s_madv1, s_macv1;

                dsdm = mDB.get_data("SELECT * FROM " + m_user + ".hopdong");
                DataRow[] r = dsdm.Tables[0].Select("manv = '" + n_manv + "'");

                ds0 = mDB.LyLichNV(n_manv);
                DataRow[] rhd = ds0.Tables[0].Select("mnvmay= '" + n_manv + "'");
                cboBoPhan.Text = rhd[0]["madv"].ToString();
                s_madv1 = cboBoPhan.Text.ToString();

                cboChucVu.Text = r[0]["macv"].ToString();
                s_macv1 = cboChucVu.Text.ToString();

                hs_cvhd1 = (r[0]["hs_cv"].ToString() != "") ? decimal.Parse(r[0]["hs_cv"].ToString()) : 0;
                hs_dhhd1 = (r[0]["hs_dh"].ToString() != "") ? decimal.Parse(r[0]["hs_dh"].ToString()) : 0;
                hs_dbhd1 = (r[0]["hs_db"].ToString() != "") ? decimal.Parse(r[0]["hs_db"].ToString()) : 0;
                hs_ldhd1 = (r[0]["hs_ld"].ToString() != "") ? decimal.Parse(r[0]["hs_ld"].ToString()) : 0;
                hs_thhd1 = (r[0]["hs_th"].ToString() != "") ? decimal.Parse(r[0]["hs_th"].ToString()) : 0;
                hs_kvhd1 = (r[0]["hs_kv"].ToString() != "") ? decimal.Parse(r[0]["hs_kv"].ToString()) : 0;
                hs_congtacphihd1 = (r[0]["pc_khac"].ToString() != "") ? decimal.Parse(r[0]["pc_khac"].ToString()) : 0;
                hs_vkhd = (r[0]["hs_vk"].ToString() != "") ? decimal.Parse(r[0]["hs_vk"].ToString()) : 0;
                

                //update dmhscv
                if (hs_cvhd1.ToString() != n_hs_cv.ToString()) 
                    mDB.upd_dmhscv(n_manv, hs_cvhd1, s_madv1, s_macv1, n_hs_tn, hs_dhhd1, hs_dbhd1, hs_ldhd1, hs_thhd1, hs_kvhd1, hs_congtacphihd1 ,hs_vkhd);

                //update tangbc neu loaihd la bien che
                if (n_loaihd == "BC") 
                    mDB.upd_tangbc(n_manv, s_madv1, s_macv1, n_loaihd);
                s_hs_lc = (r[0]["hs_lc"].ToString() != "") ? decimal.Parse(r[0]["hs_lc"].ToString()) : 0;

                //update dmhslc
                if (s_hs_lc.ToString() != n_hs_lc.ToString())
                    mDB.upd_dmhslc(n_manv, s_hs_lc, s_madv1, s_macv1, n_mangach);

                n_lan = (txtLan.Text.Trim() != "") ? int.Parse(txtLan.Text.Trim()) : 0;
                n_ngay_phep = (txt_ngaykyhd.Text.Trim() != "/  /") ? txt_ngaykyhd.Text.Trim() : "";
                if (txtLan.Text == "1")
                {
                    n_tvtungay = (txt_tungaytv.Text.Trim() != "/  /") ? txt_tungaytv.Text.Trim() : "";
                    n_tvdenngay = (txt_denngaytv.Text.Trim() != "/  /") ? txt_denngaytv.Text.Trim() : "";
                    n_chinhthuc_lv = (txt_ngaychinhthuc.Text.Trim() != "/  /") ? txt_ngaychinhthuc.Text.Trim() : "";
                }
                n_tbnghihuu = (chk_tbnghihuu.Checked == true) ? 1 : 0;
                n_thangnangluong = int.Parse(num_sothangtbnh.Value.ToString());
                ghichuct = txt_ghichuct.Text.Trim();
                //update hopdong
                gttv = mDB.upd_hopdong(n_manv, n_madv, n_macv, n_hdldso, n_ngayhd, n_loaihd, n_tungay, n_denngay, n_thoigian, n_luonghd, n_ngaydenct,
                    n_ngaynghi, "", "", n_sonphep, n_ngaybhxh, n_s_begin, n_bhyt, n_bhxh,n_bhtn,n_hs_cv, n_hs_tn, n_hs_dh, n_hs_ld, n_hs_db, n_hs_kv,
                    n_hs_lc, n_hs_th, n_luongct, n_mangach, n_lydonghi, n_hs_dt, n_pcta, ud, n_ngayvk, n_hs_vk, n_matd, n_magc, "", "", n_bac, n_tbnghihuu,
                    n_bangkhen, n_thangnangluong, n_phepthem,n_ngaygiubac, "", n_chinhthuc_lv, 0, 0, n_ko_hoanthanh, n_nam, n_thaisan,
                    "", "", n_ngay_phep, n_tvtungay, n_tvdenngay, n_lan, n_heso,n_pckh,n_sotienhd,n_ngaygiulhd,ghichuct,n_pctx,n_lhdbantg,n_stbantg,n_luongsp,n_pctdt,n_tongluong,ten_nd);
                //
                v_dg1 = (txtdg1.SelectedIndex == -1) ? "" : txtdg1.SelectedValue.ToString();
                v_dg2 = (txtdg2.SelectedIndex == -1) ? "" : txtdg2.SelectedValue.ToString();
                v_dg3 = (txtdg3.SelectedIndex == -1) ? "" : txtdg3.SelectedValue.ToString();
                v_dg4 = (txtdg4.SelectedIndex == -1) ? "" : txtdg4.SelectedValue.ToString();
                v_dg5 = (txtdg5.SelectedIndex == -1) ? "" : txtdg5.SelectedValue.ToString();
                v_dg6 = (txtdg6.SelectedIndex == -1) ? "" : txtdg6.SelectedValue.ToString();
                v_dg7 = (txtdg7.SelectedIndex == -1) ? "" : txtdg7.SelectedValue.ToString();
                v_dg8 = (txtdg8.SelectedIndex == -1) ? "" : txtdg8.SelectedValue.ToString();
                v_dg9 = (txtdg9.SelectedIndex == -1) ? "" : txtdg9.SelectedValue.ToString();
                v_dg10 = (txtdg10.SelectedIndex == -1) ? "" : txtdg10.SelectedValue.ToString();
                v_dg11 = (txtdg11.SelectedIndex == -1) ? "" : txtdg11.SelectedValue.ToString();
                if (bDgcbcc)
                {
                    sql = "update " + m_user + ".hopdong set dg1='" + v_dg1 + "',dg2='" + v_dg2 + "',dg3='" + v_dg3 + "',";
                    sql += "dg4='" + v_dg4 + "',dg5='" + v_dg5 + "',dg6='" + v_dg6 + "',";
                    sql += "dg7='" + v_dg7 + "',dg8='" + v_dg8 + "',dg9='" + v_dg9 + "',";
                    sql += "dg10='" + v_dg10 + "',dg11='" + v_dg11 + "'";
                    sql += " where manv='" + n_manv + "' and lan=" + n_lan;
                    mDB.Execute_data(sql);
                }
                //update filed ld_nghiviec<> null neu lan them moi hop dong >1
                if (bEdit && txtLan.Text.Trim() != "1")
                {
                    foreach (DataRow dr in mDB.get_data("select a.lan,a.lydonghi,a.ld_nghiviec from " + mDB.user + ".hopdong a where a.manv='" + n_manv + "'").Tables[0].Rows)
                    {
                        n_lan = (int.Parse(dr["lan"].ToString()) > n_lan) ? int.Parse(dr["lan"].ToString()) : n_lan;
                        mDB.Execute_data("update " + mDB.user + ".hopdong set ld_nghiviec='" + dr["lydonghi"].ToString() + "' where manv='" + n_manv + "'");
                    }
                    mDB.Execute_data("update " + mDB.user + ".hopdong set ld_nghiviec=null where manv='" + n_manv + "' and lan=" + n_lan + "");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                return false;
            }
            return gttv;
        }
        
        private void frmHopDong_MouseMove(object sender, MouseEventArgs e)
        {
            if (bClear)
            {
                tongso();
                bClear = false;
            }
        }
        private void load_lhdbantg()
        {
            cbo_lhdbantg.DisplayMember = "ten";
            cbo_lhdbantg.ValueMember = "ma";
            cbo_lhdbantg.DataSource = mDB.get_loaihd_bantg().Tables[0];
            cbo_lhdbantg.SelectedIndex = -1;
        }
        private void Load_LoaiHD()
        {
            cbo_loaihd.DisplayMember = "tenhd";
            cbo_loaihd.ValueMember = "mahd";
            cbo_loaihd.DataSource = mDB.get_hopdong().Tables[0];
            cbo_loaihd.SelectedIndex = 0;
        }

        private void Load_NgachCongChuc()
        {
            cbo_ngachcc.DisplayMember = "diengiai";
            cbo_ngachcc.ValueMember = "ma";
            cbo_ngachcc.DataSource = mDB.get_mangach().Tables[0];
        }
        
        private void load_heso()
        {
            cbo_hsbdhv.ValueMember = "heso";
            cbo_hsbdhv.DisplayMember = "diengiai";
            cbo_hsbdhv.DataSource = mDB.get_dmheso().Tables[0];
        }

        private void Load_DienGiai()
        {
            cbo_lydonghi.DisplayMember = "ten";
            cbo_lydonghi.ValueMember = "ma";
            cbo_lydonghi.DataSource = mDB.get_dmlydo().Tables[0];
        }

        private void cmdThem_Click(object sender, System.EventArgs e)
        {
     
            if (cbo_loaihd.SelectedIndex != -1)
            {
                switch (cbo_loaihd.SelectedValue.ToString())
                {
                    case "BC":
                        if (txt_ngaynghi.Text.Trim() == "/  /")
                        {
                            MessageBox.Show(lan.Change_language_MessageText("Nhập ngày kết thúc hợp đồng, trước khi nhập hợp đồng mới!"), lan.Change_language_MessageText("Thông báo"));
                            txt_ngaynghi.Focus();
                            return;
                        }
                        break;
                    case "HD":
                        break;
                }
            }
            else
                cbo_loaihd.SelectedIndex = 0;
            bEdit = true;
            Enabled_clt(true);
            enable_butt(false);
            btn_sua.Enabled = admin;
            btn_huy.Enabled = admin;
            clear_text();
            txtLan.Text = mDB.Get_lan_hd(lblMasoNVCT.Text).ToString();
            if (txtLan.Text == "1")
            {
                txt_tungaytv.Text = "";
                txt_denngaytv.Text = "";
                txt_ngaychinhthuc.Text = "";
                p_thoiviec_text(true);
            }
            else
            {
                int i_lan = 0;
                try
                {
                    i_lan = int.Parse(txtLan.Text.Trim()) - 1;
                }
                catch { i_lan = 0; }
                sql = "select a.macv,a.mangach,a.bac,to_char(a.ngaybnngach,'dd/mm/yyyy')as ngaybnngach,to_char(a.ngaydenct,'dd/mm/yyyy') as ngaydenct";
                sql += " , to_char(a.tungay,'dd/mm/yyyy') as tungay,to_char(a.ngayhd,'dd/mm/yyyy') as ngayhd,to_char(a.denngay,'dd/mm/yyyy') as denngay,to_char(a.ngaynghi,'dd/mm/yyyy') as ngaynghi ";
                sql += " , to_char(a.ngaybhxh,'dd/mm/yyyy') as ngaybhxh";
                sql += " ,case when a.bhxh =1 then 'true' else 'false' end as bhxh";
                sql += " ,case when a.bhyt =1 then 'true' else 'false' end as bhyt";
                sql += " ,case when a.bhtn =1 then 'true' else 'false' end as bhtn";
                sql += " ,a.hs_lc,round(to_number(a.hs_vk)*100,0) as hs_vk,a.hs_cv,a.hs_db,a.hs_th,a.hs_ld,a.hs_dh";
                sql += " ,a.hs_kv,a.hs_dt,a.hs_ud,a.hs_tn,a.pc_ta,a.pc_tx,pc_khac,a.lhd_bantg,a.st_bantg,a.luong_sp,pc_tdt,tongluong,sotien_hd,to_char(a.ngaygiulhd,'dd/mm/yyyy') as ngaygiulhd";
                sql += " from " + mDB.user + ".hopdong a where a.manv='" + n_manv + "' and lan=" + i_lan.ToString() + "";
                adsHdtruoc = mDB.get_data(sql);
                try
                {
                    txt_ngaydenct.Text = adsHdtruoc.Tables[0].Rows[0]["ngaydenct"].ToString();
                    txt_ngaykyhd.Text = adsHdtruoc.Tables[0].Rows[0]["denngay"].ToString();
                    txt_tungaytv.Text = adsHdtruoc.Tables[0].Rows[0]["tungay"].ToString();
                    txt_denngaytv.Text = adsHdtruoc.Tables[0].Rows[0]["denngay"].ToString();
                    txt_ngaychinhthuc.Text = adsHdtruoc.Tables[0].Rows[0]["ngaynghi"].ToString();
                    n_macv = adsHdtruoc.Tables[0].Rows[0]["macv"].ToString();
                    txt_ngaygiubac.Text = adsHdtruoc.Tables[0].Rows[0]["ngaybnngach"].ToString();
                    cbo_ngachcc.SelectedValue = adsHdtruoc.Tables[0].Rows[0]["mangach"].ToString();
                    cbo_bac.SelectedValue = adsHdtruoc.Tables[0].Rows[0]["bac"].ToString();
                    txt_ngaybhiem.Text = adsHdtruoc.Tables[0].Rows[0]["ngaybhxh"].ToString();
                    //load he so phu cap
                    txt_hesolc.Text = adsHdtruoc.Tables[0].Rows[0]["hs_lc"].ToString();
                    txt_hsvk.Text = adsHdtruoc.Tables[0].Rows[0]["hs_vk"].ToString();
                    txt_hscv.Text = adsHdtruoc.Tables[0].Rows[0]["hs_cv"].ToString();
                    txt_hsdb.Text = adsHdtruoc.Tables[0].Rows[0]["hs_db"].ToString();
                    txt_hsth.Text = adsHdtruoc.Tables[0].Rows[0]["hs_th"].ToString();
                    txt_hsld.Text = adsHdtruoc.Tables[0].Rows[0]["hs_ld"].ToString();
                    txt_hsdh.Text = adsHdtruoc.Tables[0].Rows[0]["hs_dh"].ToString();
                    txt_hskv.Text = adsHdtruoc.Tables[0].Rows[0]["hs_kv"].ToString();
                    txt_hsdt.Text = adsHdtruoc.Tables[0].Rows[0]["hs_dt"].ToString();
                    txt_hsud.Text = adsHdtruoc.Tables[0].Rows[0]["hs_ud"].ToString();
                    txt_hstn.Text = adsHdtruoc.Tables[0].Rows[0]["hs_tn"].ToString();
                    txt_pcta.Text = adsHdtruoc.Tables[0].Rows[0]["pc_ta"].ToString();
                    txt_pctx.Text = adsHdtruoc.Tables[0].Rows[0]["pc_tx"].ToString();
                    txt_pckh.Text = adsHdtruoc.Tables[0].Rows[0]["pc_khac"].ToString();
                    txt_stbantg.Text = adsHdtruoc.Tables[0].Rows[0]["st_bantg"].ToString();
                    txt_pctdt.Text = adsHdtruoc.Tables[0].Rows[0]["pc_tdt"].ToString();
                    txt_tongcong.Text = adsHdtruoc.Tables[0].Rows[0]["tongluong"].ToString();
                    txt_sotienhd.Text = adsHdtruoc.Tables[0].Rows[0]["sotien_hd"].ToString();
                    txt_nhluonghd.Text = adsHdtruoc.Tables[0].Rows[0]["ngaygiulhd"].ToString();
                    cbo_lhdbantg.SelectedValue = adsHdtruoc.Tables[0].Rows[0]["lhd_bantg"].ToString();
                    chk_luongsp.Checked = bool.Parse(adsHdtruoc.Tables[0].Rows[0]["luong_sp"].ToString());
                    p_thoiviec_text(false); 
                    chk_bhxh.Checked = bool.Parse(adsHdtruoc.Tables[0].Rows[0]["bhxh"].ToString());
                    chk_bhyt.Checked = bool.Parse(adsHdtruoc.Tables[0].Rows[0]["bhyt"].ToString());
                    chk_bhtn.Checked = bool.Parse(adsHdtruoc.Tables[0].Rows[0]["bhtn"].ToString());
                }
                catch { }
            }
            txt_ngaydenct.Focus();
            cbo_tuyendung.SelectedIndex = 0;
            fag = 0;
        }

        private void butHuy_Click(object sender, System.EventArgs e)
        {
            DataSet ds = new DataSet();
            DialogResult dr = MessageBox.Show(lan.Change_language_MessageText("Đồng ý huỷ thông tin hợp đồng của nhân viên này không?"),AccessData.Msg, MessageBoxButtons.YesNo, MessageBoxIcon.Question);
            if (dr == DialogResult.Yes)
            {
                try
                {
                    if (txtLan.Text.Trim() == mDB.get_data("select max(lan) from " + mDB.user + ".hopdong where manv='" + n_manv + "'").Tables[0].Rows[0][0].ToString())
                    {
                        mDB.Execute_data("delete from " + n_schema + ".ktkl where manv='" + n_manv + "'");
                        mDB.Execute_data("delete from " + n_schema + ".dmhscv where manv='" + n_manv + "'");// f_Deldmhscv(ma_nv);
                        mDB.Execute_data("delete from " + n_schema + ".tangbc WHERE manv='" + n_manv + "'");
                        mDB.Execute_data("delete from " + n_schema + ".dmhslc WHERE manv ='" + n_manv + "'");
                        mDB.Execute_data("delete from " + mDB.user + ".thaydoi_bluong WHERE manv ='" + n_manv + "'");
                        mDB.Execute_data("delete from " + mDB.user + ".dmkyluat WHERE manv ='" + n_manv + "'");
                        if (txtLan.Text.Trim() == "1")
                            mDB.Del_hopdong(n_manv, int.Parse(txtLan.Text));
                        else
                            mDB.Execute_data("delete from " + mDB.user + ".hopdong where manv='" + n_manv + "' and lan=" + txtLan.Text.Trim() + "");
                        int i_lan = int.Parse(txtLan.Text.Trim()) - 1;
                        mDB.Execute_data("update " + mDB.user + ".hopdong set ld_nghiviec=null where manv='" + n_manv + "' and lan=" + i_lan.ToString() + "");
                        MessageBox.Show(lan.Change_language_MessageText("Đã hủy ký hợp đồng lần ") + txtLan.Text.Trim() + "!", AccessData.Msg, MessageBoxButtons.OK, MessageBoxIcon.Information);
                        ds = mDB.f_countNV();
                        TSo = ds.Tables[0].Rows[0][0].ToString();
                        txtTSo.Text = "";
                        txtTSo.Text = TSo.ToString();
                        loadHD();
                        enable_butt(true);
                        btn_sua.Enabled = false; //admin;
                        btn_huy.Enabled = false; //admin;
                    }
                    else
                    {
                        MessageBox.Show(lan.Change_language_MessageText("Không hủy được lần ký hợp đồng này \nBạn phải hủy lần ký hợp đồng sau cùng!"), AccessData.Msg, MessageBoxButtons.OK, MessageBoxIcon.Information);
                        btn_ketthuc.Focus();
                        return;
                    }
                }
                catch { }
            }
        }

        private void cmdSua_Click(object sender, System.EventArgs e)
        {
            bEdit = false;
            enable_butt(false);
            btn_sua.Enabled = false;//admin;
            btn_huy.Enabled = false; //admin;
            Enabled_clt(true);
            txt_ngaydenct.Focus();
            bacluongcu = cbo_bac.Text;
            ngaygiubac = txt_ngaygiubac.Text;
            hs_cu = txt_hsvk.Text;
            if (txt_sotienhd.Text.Trim() != "")
            {
                sthd_cu = decimal.Parse(txt_sotienhd.Text.Trim());
            }
            else
            {
                sthd_cu = 0;
            }
            if (txt_nhluonghd.Text.ToString().Trim() == "/  /")
            {
                nglhd_cu = "";
            }
            else
            {
                nglhd_cu = txt_nhluonghd.Text.Trim();
            }
            if (txt_ngayvk.Text.ToString().Trim() == "/  /")
            {
                ngayquydinh = "";
            }
            else
            {
                ngayquydinh = txt_ngayvk.Text;
            }
            
            mangachcu = mDB.get_data("select ma1 from " + mDB.user + ".mangach where ma='" + cbo_ngachcc.SelectedValue.ToString().Trim() + "'").Tables[0].Rows[0]["ma1"].ToString();
            fag = 1;
            if (cbo_loaihd.SelectedIndex != -1)
                if (cbo_loaihd.SelectedValue.ToString() == "BC" || cbo_loaihd.SelectedValue.ToString() == "DH")
                {
                    num_sothanghd.Enabled = false;
                    txt_denngayhd.Enabled = false;
                    setthuviec(true);
                }
        }

        private void butIn_Click(object sender, EventArgs e)
        {
            int atm = Convert.ToInt32(mDB.bTheATM());

            sql = "select a.manv,a.ho,a.ten,to_char(a.ngaysinh,'dd/mm/yyyy') as ngaysinh,to_char(a.noisinh) as noisinh,";
            sql += " a.cmndso,to_char(a.cmndngay,'dd/mm/yyyy') as cmndngay,a.noicapcmnd as cmndnoicap,";
            sql += " to_char(b.ngayphepnam,'dd/mm/yyyy') as ngayhd,to_char(b.tungay,'dd/mm/yyyy') as tungay,to_char(b.denngay,'dd/mm/yyyy') as denngay,";
            sql += " to_char(b.tvtungay,'dd/mm/yyyy') as tvtungay,to_char(b.tvdenngay,'dd/mm/yyyy') as tvdenngay,";
            sql += " d.ten as chucdanh,e.diengiai as chucvu,to_char(a.sold) as sold,to_char(a.ngaysold,'dd/mm/yyyy') as ngaysold,";
            sql += " (a.huyensld||', '||f.tentt) as noicapsold,g.tenhd,h.tenctdt as nghenghiep,b.loaihd,b.lan,trim(a.noio)||' - '||trim(q.tenquan)||' - '||trim(tt.tentt)as noio ,a.t_noio,a.h_noio,";
            sql += " b.mangach,c.diengiai,b.hs_lc as heso,b.bac as bacluong,b.hs_vk,b.hs_ld,b.hs_th,b.hs_dt,b.hs_dh,b.hs_tn, b.pc_ta,b.pc_tx,b.pc_khac";
            sql += " ,k.ten as ten_lhdbantg,b.st_bantg,b.luong_sp,pc_tdt,tongluong";
            if (atm == 1)
            {
                sql += " ,'bằng thẻ' as hinhthuctra";
            }
            else
            {
                sql += " ,'bằng tiền mặt' as hinhthuctra";
            }
            sql += " from " + n_schema + ".llnv a inner join " + n_schema + ".hopdong b on a.manv=b.manv";
            sql += " left join " + n_schema + ".mangach c on b.mangach=c.ma";
            sql += " left join " + n_schema + ".dmcd d on a.macd=d.ma";
            sql += " left join " + n_schema + ".dmcv e on b.macv=e.macv";
            sql += " left join " + n_schema + ".btdtt f on a.tinhsld=f.matt";
            sql += " left join " + n_schema + ".btdquan q on a.h_noio=q.maqu";
            sql += " left join " + n_schema + ".btdtt tt on a.t_noio=tt.matt";
            sql += " left join " + n_schema + ".mahd g on b.loaihd=g.mahd";
            sql += " left join " + n_schema + ".ctdaotao h on a.nnghiep=h.mactdt";
            sql += " left join "+n_schema+".loaihd_bantg k on b.lhd_bantg=k.ma";
            sql += " where a.manv='" + n_manv + "' and b.lan=" + txtLan.Text.Trim();
            DataSet ads = mDB.get_data(sql);
            if (!System.IO.Directory.Exists("..\\xml")) System.IO.Directory.CreateDirectory("..\\xml");
            ads.WriteXml("..\\xml\\hopdong.xml", XmlWriteMode.WriteSchema);
            if (!System.IO.Directory.Exists("..\\Report"))
            {
                MessageBox.Show("Không tồn tại thư mục Report!", AccessData.Msg, MessageBoxButtons.OK, MessageBoxIcon.Information);
                btn_ketthuc.Focus();
                return;
            }
            if (!System.IO.File.Exists("..\\Report\\h_Hopdong_ls.rpt"))
            {
                MessageBox.Show(lan.Change_language_MessageText("Không có file h_Hopdong.rpt!"), AccessData.Msg, MessageBoxButtons.OK, MessageBoxIcon.Information);
                btn_ketthuc.Focus();
                return;
            }
            frmReport f = new frmReport(mDB, ads, lan.Change_language_MessageText("HỢP ĐỒNG LAO ĐỘNG"), "h_Hopdong_ls.rpt", true,ten_nd);
            f.ShowDialog();
        }

        private void cmdCencel_Click(object sender, System.EventArgs e)
        {
            enable_butt(true);
            btn_sua.Enabled = admin;
            btn_huy.Enabled = admin;
            Enabled_clt(false);
            btn_ketthuc.Focus();
        }

        
        private decimal get_nhombc(string loaihd)
        {
            sql = " select nhombc from " + mDB.user + ".mahd where mahd='" + loaihd + "'";
            DataSet ds_nbc = mDB.get_data(sql);
            return decimal.Parse(ds_nbc.Tables[0].Rows[0]["nhombc"].ToString().Trim());
        }
      
        public void setthuviec(bool av)
        {
            txt_ngaybhiem.Enabled = av;
            chk_bhxh.Enabled = av;
            chk_bhyt.Enabled = av;
            chk_bhtn.Enabled = av;
            num_sothanghd.Enabled = av;
            if (!av)
            {
                txt_ngaybhiem.Text = "";
                chk_bhxh.Checked = av;
                chk_bhyt.Checked = av;
                chk_bhtn.Enabled = av;
            }
        }

        public string get_NGAYDENCT
        {
            get
            {
                return txt_ngaydenct.Text;
            }
        }
        private void p_thoiviec_text(bool ena)
        {
            l_tungay.Text = (ena) ? lan.Change_language_MessageText("Thử việc từ ngày") : lan.Change_language_MessageText("Ngày ký lần trước");
            l_denngay.Text = (ena) ? lan.Change_language_MessageText("đến ngày") : lan.Change_language_MessageText("đến ngày");
            l_ngaychinhthuc.Text = (ena) ? lan.Change_language_MessageText("Ngày làm chính thức") : lan.Change_language_MessageText("Chính thức chuyển từ");
        }     

        private void dgrhsl_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                DataTable dt_tmp = new DataTable();
                DataRowView arv = (DataRowView)(dgrhsl.CurrentRow.DataBoundItem);
                txtLan.Text = arv["lan"].ToString();
                txt_ngaydenct.Text = arv["m_ngaydenct"].ToString();
                txt_sohd.Text = arv["hdldso"].ToString();
                cbo_loaihd.SelectedValue = arv["loaihd"].ToString();
                num_sothanghd.Value = int.Parse(arv["thoigian"].ToString());
                cbo_ngachcc.SelectedValue = arv["mangach"].ToString();
                cbo_tuyendung.SelectedValue = arv["matd"].ToString();
                txt_tungayhd.Text = (arv["m_tungay"].ToString());
                txt_denngayhd.Text = (arv["m_denngay"].ToString());
                txt_ngayhuongluong.Text = (arv["m_s_begin"].ToString());
                txt_ngaygiubac.Text = (arv["m_ngaybnngach"].ToString());
                txt_ngayvk.Text = (arv["ngay_vk"].ToString());
                //
                if (cbo_ngachcc.SelectedIndex != -1)
                {
                    load_bac();
                }
                cbo_bac.SelectedValue = int.Parse(arv["bac"].ToString());
                //
                cbo_ghichu.SelectedValue = arv["magc"].ToString();
                decimal luong_hd = 0;
                luong_hd = (arv["luonghd"].ToString() != "") ? decimal.Parse(arv["luonghd"].ToString()) : 0;
                txt_mltt.Text = luong_hd.ToString("#,###.###");
                decimal luong_ct = 0;
                luong_ct = (arv["luongct"].ToString() != "") ? decimal.Parse(arv["luongct"].ToString()) : 0;
                txt_luongcb.Text = luong_ct.ToString("#,###.###");
                txt_ngaybhiem.Text = (arv["m_ngaybhxh"].ToString());
                decimal snp_hd = 0;
                snp_hd = (arv["sonphep"].ToString() != "") ? decimal.Parse(arv["sonphep"].ToString()) : 0;
                txt_ngayphep.Text = snp_hd.ToString("0.#");
                chk_bhxh.Checked = arv["bhxh"].ToString() == "1";
                chk_bhyt.Checked = arv["bhyt"].ToString() == "1";
                chk_bhtn.Checked = arv["bhtn"].ToString() == "1";
                decimal hs_lchd = 0;
                hs_lchd = (arv["hs_lc"].ToString() != "") ? decimal.Parse(arv["hs_lc"].ToString()) : 0;
                txt_hesolc.Text = hs_lchd.ToString("0.###");
                decimal hs_cvhd = 0;
                hs_cvhd = (arv["hs_cv"].ToString() != "") ? decimal.Parse(arv["hs_cv"].ToString()) : 0;
                txt_hscv.Text = hs_cvhd.ToString("0.##");
                if (s_stcv.Trim() == "1")
                {
                    txt_hscv.Text = hs_cvhd.ToString("#,###.###");
                }
                decimal hs_tnhd = 0;
                hs_tnhd = (arv["hs_tn"].ToString() != "") ? decimal.Parse(arv["hs_tn"].ToString()) : 0;
                txt_hstn.Text = hs_tnhd.ToString("0.##");
                if (s_sttn.Trim() == "1")
                {
                    txt_hstn.Text = hs_tnhd.ToString("#,###.###");
                }
                decimal hs_kvhd = 0;
                hs_kvhd = (arv["hs_kv"].ToString() != "") ? decimal.Parse(arv["hs_kv"].ToString()) : 0;
                txt_hskv.Text = hs_kvhd.ToString("0.##");
                if (s_stkv.Trim() == "1")
                {
                    txt_hskv.Text = hs_kvhd.ToString("#,###.###");
                }
                decimal hs_dthd = 0, hs_ud = 0;
                hs_ud = (arv["hs_ud"].ToString() != "") ? decimal.Parse(arv["hs_ud"].ToString()) : 0;
                txt_hsud.Text = hs_ud.ToString("#,##0.00");
                hs_dthd = (arv["hs_dt"].ToString() != "") ? decimal.Parse(arv["hs_dt"].ToString()) : 0;
                txt_hsdt.Text = hs_dthd.ToString("0.##");               
                decimal hs_thhd = 0;
                hs_thhd = (arv["hs_th"].ToString() != "") ? decimal.Parse(arv["hs_th"].ToString()) : 0;
                txt_hsth.Text = hs_thhd.ToString("0.##");
                if (s_stth.Trim() == "1")
                {
                    txt_hsth.Text = hs_thhd.ToString("#,###.###");
                }
                decimal hs_ldhd = 0;
                hs_ldhd = (arv["hs_ld"].ToString() != "") ? decimal.Parse(arv["hs_ld"].ToString()) : 0;
                txt_hsld.Text = hs_ldhd.ToString("0.##");
                if (s_stld.Trim() == "1")
                {
                    txt_hsld.Text = hs_ldhd.ToString("#,###.###");
                }
                decimal hs_dbhd = 0;
                hs_dbhd = (arv["hs_db"].ToString() != "") ? decimal.Parse(arv["hs_db"].ToString()) : 0;
                txt_hsdb.Text = hs_dbhd.ToString("0.##");
                decimal hs_dhhd = 0;
                hs_dhhd = (arv["hs_dh"].ToString() != "") ? decimal.Parse(arv["hs_dh"].ToString()) : 0;
                txt_hsdh.Text = hs_dhhd.ToString("0.##");
                if (s_stdh.Trim() == "1")
                {
                    txt_hsdh.Text = hs_dhhd.ToString("#,###.###");
                }
                decimal hs_vkhd = 0;
                hs_vkhd = (arv["hs_vk"].ToString() != "") ? decimal.Parse(arv["hs_vk"].ToString()) : 0;
                txt_hsvk.Text = hs_vkhd.ToString("0.##");
                decimal pc_khac = 0, sotien_hd = 0, pc_tx = 0, pc_ta = 0,st_bantg=0,pc_tdt=0,tongluong=0;
                pc_khac = (arv["pc_khac"].ToString() != "") ? decimal.Parse(arv["pc_khac"].ToString()) : 0;
                txt_pckh.Text = pc_khac.ToString("#,###.###");
                pc_tx = (arv["pc_tx"].ToString() != "") ? decimal.Parse(arv["pc_tx"].ToString()) : 0;
                txt_pctx.Text = pc_tx.ToString("#,###.###");
                pc_ta = (arv["pc_ta"].ToString() != "") ? decimal.Parse(arv["pc_ta"].ToString()) : 0;
                txt_pcta.Text = pc_ta.ToString("#,###.###");
                sotien_hd = (arv["sotien_hd"].ToString() != "") ? decimal.Parse(arv["sotien_hd"].ToString()) : 0;
                txt_sotienhd.Text = sotien_hd.ToString("#,###.###");                
                txt_nhluonghd.Text = (arv["ngaygiulhd"].ToString());
                st_bantg = (arv["st_bantg"].ToString() != "") ? decimal.Parse(arv["st_bantg"].ToString()) : 0;
                txt_stbantg.Text = st_bantg.ToString("##");
                pc_tdt = (arv["pc_tdt"].ToString() != "") ? decimal.Parse(arv["pc_tdt"].ToString()) : 0;
                txt_pctdt.Text = pc_tdt.ToString("#,###.###");
                tongluong = (arv["tongluong"].ToString() != "") ? decimal.Parse(arv["tongluong"].ToString()) : 0;
                txt_tongcong.Text = tongluong.ToString("#,###.###");
                txt_ngaynghi.Text = (arv["m_ngaynghi"].ToString());
                cbo_hsbdhv.SelectedValue = arv["heso"].ToString();
                cbo_lydonghi.SelectedValue = arv["ld_nghiviec"].ToString();
                txtLan.Text = arv["lan"].ToString();
                //
                txt_ngaykyhd.Text = arv["m_ngayhd"].ToString();
                num_sothangtbnh.Value = decimal.Parse(arv["thangnangluong"].ToString());
                chk_tbnghihuu.Checked = arv["tbnghihuu"].ToString() == "1";
                txt_phepthem.Text = arv["phepthem"].ToString();
                chk_luongsp.Checked = arv["luong_sp"].ToString() == "1";
                cbo_lhdbantg.SelectedValue = arv["lhd_bantg"].ToString();
                if (txtLan.Text == "1")
                {
                    txt_tungaytv.Text = arv["TVTN"].ToString();
                    txt_denngaytv.Text = arv["TVDN"].ToString();
                    txt_ngaychinhthuc.Text = arv["m_chinhthuc_lv"].ToString();
                    p_thoiviec_text(true);
                }
                else
                {
                    int i_lan = 0;
                    try
                    {
                        i_lan = int.Parse(txtLan.Text.Trim()) - 1;
                    }
                    catch { i_lan = 0; }
                    sql = "select to_char(a.tungay,'dd/mm/yyyy') as tungay,to_char(a.denngay,'dd/mm/yyyy') as denngay,to_char(a.ngaynghi,'dd/mm/yyyy') as ngaynghi from " + mDB.user + ".hopdong a where a.manv='" + n_manv + "' and lan=" + i_lan.ToString() + "";
                    adsHdtruoc = mDB.get_data(sql);
                    txt_tungaytv.Text = adsHdtruoc.Tables[0].Rows[0]["tungay"].ToString();
                    txt_denngaytv.Text = adsHdtruoc.Tables[0].Rows[0]["denngay"].ToString();
                    txt_ngaychinhthuc.Text = adsHdtruoc.Tables[0].Rows[0]["ngaynghi"].ToString();
                    p_thoiviec_text(false);
                }
                //
                if (bDgcbcc)
                {
                    sql = "select dg1,dg2,dg3,dg4,dg5,dg6,dg7,dg8,dg9,dg10,dg11 from " + m_user + ".hopdong  where manv='" + n_manv + "' and lan=" + txtLan.Text;
                    dt_tmp = mDB.get_data(sql).Tables[0];
                    foreach (DataRow r in dt_tmp.Rows)
                    {
                        txtdg1.SelectedValue = r["dg1"].ToString();
                        txtdg2.SelectedValue = r["dg2"].ToString();
                        txtdg3.SelectedValue = r["dg3"].ToString();
                        //
                        txtdg4.SelectedValue = r["dg4"].ToString();
                        txtdg5.SelectedValue = r["dg5"].ToString();
                        txtdg6.SelectedValue = r["dg6"].ToString();
                        //
                        txtdg7.SelectedValue = r["dg7"].ToString();
                        txtdg8.SelectedValue = r["dg8"].ToString();
                        txtdg9.SelectedValue = r["dg9"].ToString();
                        //
                        txtdg10.SelectedValue = r["dg10"].ToString();
                        txtdg11.SelectedValue = r["dg11"].ToString();
                    }
                }
            }
            catch 
            {
            }
        }

        public bool luunangbacluong()
        {
            bacluongmoi = cbo_bac.Text;
            ngaynangbac = txt_ngaygiubac.Text;
            mangachmoi = mDB.get_data("select ma1 from " + mDB.user + ".mangach where ma='" + cbo_ngachcc.SelectedValue.ToString().Trim() + "'").Tables[0].Rows[0]["ma1"].ToString();
            string ddmmyy = DateTime.Now.Month.ToString().PadLeft(2, '0') + DateTime.Now.Year.ToString().Substring(2, 2);
            if (!bacluongmoi.Equals(bacluongcu))
            {
                return mDB.update_bacluong(n_manv, ddmmyy, ngaygiubac, bacluongcu, ngaynangbac, bacluongmoi, mangachcu, mangachmoi, DateTime.Now.Date.ToString("dd/MM/yyyy"),n_madv,n_macv);
            }
            return true;
        }

        private bool nangphucapvuotkhung()
        {
            hs_moi = txt_hsvk.Text;
            ngaygiu = txt_ngayvk.Text;
            string ddmmyy = DateTime.Now.Month.ToString().PadLeft(2, '0') + DateTime.Now.Year.ToString().Substring(2, 2);
            if (!hs_moi.Equals(hs_cu))
            {
                loaiphucap = "vk";
                return mDB.update_vuotkhung(n_manv, ddmmyy, loaiphucap,Math.Round(decimal.Parse(hs_cu)/100,2), ngayquydinh,Math.Round(decimal.Parse(hs_moi)/100,2), ngaygiu, DateTime.Now.Date.ToString("dd/MM/yyyy"),n_madv,n_macv);
            }
            return true;
        }
        private bool nangluonghopdong()
        {
            if (txt_sotienhd.Text.Trim() != "")
            {
                sthd_moi = decimal.Parse(txt_sotienhd.Text.Trim());
            }
            else
            {
                sthd_moi = 0;
            }
            nglhd_moi = txt_nhluonghd.Text.Trim();
            string ddmmyy = DateTime.Now.Month.ToString().PadLeft(2, '0') + DateTime.Now.Year.ToString().Substring(2, 2);
            if (!sthd_moi.Equals(sthd_cu))
            {
                loaiphucap = "lk";
                return mDB.update_vuotkhung(n_manv, ddmmyy, loaiphucap, sthd_cu, nglhd_cu, sthd_moi, nglhd_moi, DateTime.Now.Date.ToString("dd/MM/yyyy"), n_madv, n_macv);
            }
            return true;
        }
        #region su kien control

        private void txtBac_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            try
            {
                if (e.KeyCode == Keys.Enter)
                {
                    if (cbo_loaihd.SelectedValue.ToString() == "BC")
                        txt_ngayhuongluong.Focus();
                    else
                        txt_tungayhd.Focus();
                }
                string sql = "select b" + int.Parse(txtBac.Text.Trim()) + " from mangach where ma='" + cbo_ngachcc.SelectedValue.ToString() + "'";
                DataSet ds = mDB.get_data(sql);
                txt_hesolc.Text = ds.Tables[0].Rows[0][0].ToString();
            }
            catch { }
        }

        private void txtBac_Validated(object sender, System.EventArgs e)
        {
            try
            {
                if (txtBac.Text == "0" || int.Parse(txtBac.Text) < 0 || int.Parse(txtBac.Text) > 17)
                {
                    MessageBox.Show(lan.Change_language_MessageText("Nhập bậc lương không hợp lệ"), this.Text);
                    txtBac.Focus();
                }
            }
            catch { }
        }

        private void txtBac_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
        {
            if (!IsNumeric(e.KeyChar.ToString()))
                e.Handled = true;
            if (e.KeyChar == 8)
                e.Handled = false;
        }
        private void txt_ghichuct_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void txt_ghichuct_Validated(object sender, EventArgs e)
        {
            int  yyct =Convert.ToInt32(txt_ngaydenct.Text.Substring(6, 4));
            int nam = Convert.ToInt32(DateTime.Now.Year.ToString()) - yyct;
            if (nam >= 1)
            {
                txt_ngayphep.Text = "12";
            }
            else
            {
                txt_ngayphep.Text = "0";
            }            
        }
        private void txtNam_KeyPress(object sender, KeyPressEventArgs e)
        {
            if ((e.KeyChar < '0' || e.KeyChar > '9') && e.KeyChar != '\b')
                e.KeyChar = '\0';
        }
       

        private void txtloaingach_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void chkKHHNV_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter) SendKeys.Send("{Tab}");
        }

        private void txtNam_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter) SendKeys.Send("{Tab}");
        }

        private void txtThangHS_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter) SendKeys.Send("{Tab}");
        }

        private void chkNL_tth_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter) SendKeys.Send("{Tab}");
        }

        private void txtDT1_HD_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
        {
            if (!IsNumeric(e.KeyChar.ToString()))
                e.Handled = true;
            if (e.KeyChar == 8)
                e.Handled = false;
        }

        private void txtDT1_HD_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                txt_ngaynghi.Focus();
        }

        private void txtLuuY_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                txt_hesolc.Focus();
        }

        private void txtTN_HSL_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                SendKeys.Send("{Tab}");
            }
        }

        private void txthsl_HSL_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter) SendKeys.Send("{Tab}");
        }

        private void txtvk_HSL_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter) SendKeys.Send("{Tab}");
        }

        private void txtdh_HSL_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter) SendKeys.Send("{Tab}");
        }
        private void txtvuotkhung_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                btn_luu.Focus();
            }
        }

        private void txtTN_HD_Validated(object sender, System.EventArgs e)
        {
            if (txt_pcta.Text.Trim() == "")
                txt_pcta.Text = "0";
        }

        private void dgrTTKhenThuong_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }
        private void dgrTTKyLuat_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }
        private void txtN_KT_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter) SendKeys.Send("{Tab}");
        }

        private void txtND_KT_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void txtHT_KT_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void txtVBS_KT_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void cmdLuu_KT_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void txtN_KL_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void txtND_KL_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void txtHT_KL_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void txtVBS_KL_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void cmdLuu_CT_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }
        #endregion

        private void frmHopDong_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.Alt && e.KeyCode == Keys.T)
            {
                cmdThem_Click(null, null);
            }
            if (e.Alt && e.KeyCode == Keys.S)
            {
                cmdSua_Click(null, null);
            }
            if (e.Alt && e.KeyCode == Keys.H)
            {
                butHuy_Click(null, null);
            }
            if (e.Alt && e.KeyCode == Keys.L)
            {
                butThem_Click(null, null);
            }
            if (e.Alt && e.KeyCode == Keys.B)
            {
                cmdCencel_Click(null, null);
            }
            if (e.Alt && e.KeyCode == Keys.I)
            {
                butIn_Click(null, null);
            }
            if (e.Alt && e.KeyCode == Keys.K)
            {
                butKetThuc_Click(null, null);
            }
        }
        private void txt_ngaydenct_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                SendKeys.Send("{Tab}");
            }
        }

        private void txt_ngaydenct_Validated(object sender, EventArgs e)
        {
            txt_ngaydenct.Text = txt_ngaydenct.Text.Trim();
            if (txt_ngaydenct.Text.Trim() == "/  /")
            {
                MessageBox.Show(lan.Change_language_MessageText("Nhập ngày đến công tác!"), AccessData.Msg, MessageBoxButtons.OK, MessageBoxIcon.Information);
                txt_ngaydenct.Focus();
                return;
            }
            if (!mDB.kiemtrangayhople(txt_ngaydenct.Text.Trim()))
            {
                txt_ngaydenct.Focus();
                return;
            }
            if (txtLan.Text.Trim() == "1")
            {
                txt_ngaykyhd.Text = txt_ngaydenct.Text;
            }
            txt_ngayhuongluong.Text = txt_ngayhuongluong.Text;
        }

        private void txt_sohd_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}{F4}");
        }

        private void cbo_loaihd_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                if (cbo_loaihd.SelectedIndex != -1)
                    if (cbo_loaihd.SelectedValue.ToString() == "BC")
                    {
                        num_sothanghd.Value = 0;
                    }
                    else
                    {

                        num_sothanghd.Enabled = true;
                        txt_denngayhd.Enabled = true;
                    }
                SendKeys.Send("{Tab}");
            }
        }

        private void cbo_loaihd_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (this.ActiveControl == cbo_loaihd)
            {
                if (cbo_loaihd.SelectedIndex != -1)
                {
                    if (mDB.sothang_hd(cbo_loaihd.SelectedValue.ToString().Trim()) == 0)
                    {
                        num_sothanghd.Enabled = false;
                    }
                    else
                    {
                        num_sothanghd.Enabled = true;
                        num_sothanghd.Value = mDB.sothang_hd(cbo_loaihd.SelectedValue.ToString().Trim());
                    }
                    //if (cbo_loaihd.SelectedValue.ToString() == "BC")
                    //{
                    //    cbo_ngachcc.Enabled = true;
                    //    cbo_bac.Enabled = true;
                    //    setthuviec(true);                        
                    //}
                    //else
                    //{
                    //    num_sothanghd.Enabled = true;
                    //    txt_denngayhd.Enabled = true;
                    //    if (cbo_loaihd.SelectedValue.ToString().Equals("TV"))
                    //        setthuviec(true);
                    //    else
                    //        setthuviec(true);
                    //}
                }
            }
        }

        private void cbo_loaihd_SelectedValueChanged(object sender, EventArgs e)
        {
            txt_sotienhd.Text = "0";
        }

        private void cbo_loaihd_Validated(object sender, EventArgs e)
        {
            if (cbo_loaihd.SelectedIndex != -1)
            {
                p_thuviec.Enabled = (cbo_loaihd.SelectedValue.ToString() == "TV");
                txt_tungaytv.Enabled = (cbo_loaihd.SelectedValue.ToString() == "TV");
                txt_denngaytv.Enabled = (cbo_loaihd.SelectedValue.ToString() == "TV");
                txt_ngaychinhthuc.Enabled = (cbo_loaihd.SelectedValue.ToString() == "TV");
            }
        }

        private void num_sothanghd_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void num_sothanghd_Validated(object sender, EventArgs e)
        {
            try
            {
                Convert.ToInt32(num_sothanghd.Value.ToString());
            }
            catch
            {
                num_sothanghd.Value = 0; 
            }
        }

        private void txt_ngaykyhd_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void txt_ngaykyhd_Validated(object sender, EventArgs e)
        {
            txt_ngaykyhd.Text = txt_ngaykyhd.Text.Trim();
            if (txt_ngaykyhd.Text.Trim() == "/  /")
            {
                MessageBox.Show(lan.Change_language_MessageText("Nhập ngày ký hợp đồng!"), AccessData.Msg, MessageBoxButtons.OK, MessageBoxIcon.Information);
                txt_ngaykyhd.Focus();
                return;
            }
            if (!mDB.kiemtrangayhople(txt_ngaykyhd.Text.Trim()))
            {
                MessageBox.Show(lan.Change_language_MessageText("Ngày không hợp lệ!"), AccessData.Msg, MessageBoxButtons.OK, MessageBoxIcon.Information);
                txt_ngaykyhd.Focus();
                return;
            }
            txt_tungayhd.Text = txt_ngaykyhd.Text;
        }

        private void txt_tungayhd_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                if (mDB.sothang_hd(cbo_loaihd.SelectedValue.ToString().Trim()) > 0)
                {
                    txt_ngayhuongluong.Text = txt_ngaydenct.Text;
                    txt_denngayhd.Visible = true;
                    num_sothanghd.Enabled = true;
                    txt_denngayhd.Focus();
                }
                else
                {
                    txt_ngayhuongluong.Text = txt_ngaydenct.Text;
                    txt_denngayhd.Enabled = false;
                    num_sothanghd.Enabled = false;
                    cbo_tuyendung.Focus();
                    SendKeys.Send("F4");
                }               
            }
        }

        private void txt_tungayhd_Validated(object sender, EventArgs e)
        {
            try
            {
                if (mDB.sothang_hd(cbo_loaihd.SelectedValue.ToString().Trim()) > 0)
                {
                    txt_ngayhuongluong.Text = txt_ngaydenct.Text;
                    txt_denngayhd.Focus();
                    int ddns = 0, mmns = 0, yyns = 0;
                    try
                    {
                        ddns = int.Parse(txt_tungayhd.Text.Substring(0, 2));
                        mmns = int.Parse(txt_tungayhd.Text.Substring(3, 2));
                        yyns = int.Parse(txt_tungayhd.Text.Substring(6, 4));
                    }
                    catch { }
                    int temp;
                    temp = int.Parse(num_sothanghd.Text);
                    DateTime d1, d2;
                    d1 = new DateTime(yyns, mmns, ddns);
                    d2 = d1.AddMonths(temp);
                    txt_denngayhd.Text = d2.ToString("dd/MM/yyyy", null);
                }
                else
                {
                    txt_ngayhuongluong.Text = txt_ngaydenct.Text;
                    txt_denngayhd.Enabled = false;
                    num_sothanghd.Enabled = false;
                    txt_ngayhuongluong.Focus();
                }
            }
            catch { }
        }

        private void txt_denngayhd_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}{F4}");
        }

        private void txt_denngayhd_Validated(object sender, EventArgs e)
        {
            txt_denngayhd.Text = txt_denngayhd.Text.Trim();
            if (txt_denngayhd.Text.Trim() == "/  /")
            {
                return;
            }
            if (!mDB.kiemtrangayhople(txt_denngayhd.Text.Trim()))
            {
                txt_denngayhd.Focus();
                return;
            }
            int ddns = 0, mmns = 0, yyns = 0;
            try
            {
                ddns = int.Parse(txt_denngayhd.Text.Substring(0, 2));
                mmns = int.Parse(txt_denngayhd.Text.Substring(3, 2));
                yyns = int.Parse(txt_denngayhd.Text.Substring(6, 4));
            }
            catch { }

            int dd = 0, mm = 0, yy = 0;
            try
            {
                dd = int.Parse(txt_tungayhd.Text.Substring(0, 2));
                mm = int.Parse(txt_tungayhd.Text.Substring(3, 2));
                yy = int.Parse(txt_tungayhd.Text.Substring(6, 4));
            }
            catch { }
            try
            {
                if (yyns < yy)
                {
                    MessageBox.Show(lan.Change_language_MessageText("Năm của từ ngày ") + txt_tungayhd.Text + lan.Change_language_MessageText(" phải nhỏ hơn năm của đến ngày hợp đồng"), AccessData.Msg);
                    txt_denngayhd.Focus();
                    return;
                }
                if (yyns == yy)
                {
                    if (mmns < mm)
                    {
                        MessageBox.Show(lan.Change_language_MessageText("Tháng của từ ngày") + txt_tungayhd.Text + lan.Change_language_MessageText(" phải nhỏ hơn tháng của đến ngày hợp đồng"), AccessData.Msg);
                        txt_denngayhd.Focus();
                        return;
                    }
                    if (mmns == mm)
                    {
                        if (ddns < dd)
                        {
                            MessageBox.Show(lan.Change_language_MessageText("Ngày của từ ngày") + txt_tungayhd.Text + lan.Change_language_MessageText(" phải nhỏ hơn của đến ngày hợp đồng"), AccessData.Msg);
                            txt_denngayhd.Focus();
                            return;
                        }
                    }
                }
            }
            catch { }
        }

        private void cbo_tuyendung_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter) 
                SendKeys.Send("{Tab}{F4}");
        }

        private void cbo_ngachcc_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                cbo_bac.Focus();
                SendKeys.Send("{F4}");
            }
        }
        private void cbo_ngachcc_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cbo_ngachcc.SelectedIndex != -1)
            {
                load_bac();
            }
        }
        private void load_bac()
        {
            try
            {
                DataSet dsb = new DataSet();
                string sql = "SELECT B1,B2,B3,B4,B5,B6,B7,B8,B9,B10,B11,B12 FROM " + m_user + ".mangach where ma='" + cbo_ngachcc.SelectedValue.ToString() + "'";
                dsb = mDB.get_data(sql);
                DataTable dt = new DataTable();
                dt.Columns.Add("bac", typeof(int));
                dt.Columns.Add("heso", typeof(decimal));
                dt.Columns.Add("hsbac", typeof(string));
                for (int i = 0; i < dsb.Tables[0].Columns.Count; i++)
                {
                    DataRow dr = dt.NewRow();
                    dr[0] = Convert.ToString(i + 1);
                    dr[1] = decimal.Parse(dsb.Tables[0].Rows[0][i].ToString());
                    dr[2] = Convert.ToString(i + 1) + "  |  " + decimal.Parse(dsb.Tables[0].Rows[0][i].ToString());
                    if (dr[1].ToString() != "0")
                    {
                        dt.Rows.Add(dr);
                    }
                }
                cbo_bac.DisplayMember = "hsbac";
                cbo_bac.ValueMember = "bac";
                cbo_bac.DataSource = dt;
            }
            catch (Exception ex)
            {
                MessageBox.Show("Lỗi do " + ex.StackTrace, AccessData.Msg);
            }
        }
        private void cbo_bac_KeyDown(object sender, KeyEventArgs e)
        {
            try
            {
                if (bEdit && txtLan.Text == "1")
                {
                    if (e.KeyCode == Keys.Enter)
                    {
                        txt_ngayhuongluong.Text = txt_ngaydenct.Text;
                        txt_tungayhd.Text = txt_ngaydenct.Text;
                        SendKeys.Send("{Tab}");
                    }
                }
                if (cbo_ngachcc.SelectedIndex != -1)
                {
                    string aexp = "select b";
                    aexp += (cbo_bac.SelectedIndex != -1) ? Convert.ToString(int.Parse(cbo_bac.SelectedValue.ToString().Trim())) : "0";
                    aexp += " from " + m_user + ".mangach";
                    aexp += (cbo_ngachcc.SelectedIndex != -1) ? " where ma='" + cbo_ngachcc.SelectedValue.ToString() + "'" : " where ma=''";
                    DataSet ds = mDB.get_data(aexp);
                    txt_hesolc.Text = ds.Tables[0].Rows[0][0].ToString();
                }
                if (cbo_bac.SelectedIndex != -1)
                {
                    txt_ngaygiubac.Enabled = true;
                }
                else
                {
                    txt_ngaygiubac.Enabled = false;
                }    
                SendKeys.Send("{Tab}");
            }
            catch { SendKeys.Send("{Tab}"); }
        }

        private void cbo_bac_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (this.ActiveControl == cbo_bac)
            {
                try
                {
                    string sql = "select b" + int.Parse(cbo_bac.SelectedValue.ToString().Trim()) + " from " + m_user + ".mangach where ma='" + cbo_ngachcc.SelectedValue.ToString() + "'";
                    DataSet ds = mDB.get_data(sql);
                    txt_hesolc.Text = ds.Tables[0].Rows[0][0].ToString();
                }
                catch { }
            }
        }

        private void cbo_bac_Validated(object sender, EventArgs e)
        {
            decimal luongct = 0, m_hesol = 0, tyle_tv = 0;
            try
            {
                if (cbo_loaihd.SelectedValue.ToString().Trim() == "TV")
                {
                    tyle_tv = decimal.Parse(mDB.tyle_tv(s_mmyy).ToString());
                    m_hesol = decimal.Parse(txt_hesolc.Text.ToString());
                    luongct = m_hesol * (decimal)mDB.pltoithieu() * tyle_tv / 100;
                    txt_luongcb.Text = luongct.ToString("###,###");
                }
                else
                {
                    m_hesol = decimal.Parse(txt_hesolc.Text.ToString());
                    luongct = m_hesol * (decimal)mDB.pltoithieu();
                    txt_luongcb.Text = luongct.ToString("###,###");
                }
            }
            catch
            {
                txt_luongcb.Text = "0";
            }                    
        }

        private void txt_ngaygiubac_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void txt_ngaygiubac_Validated(object sender, EventArgs e)
        {
            txt_ngaygiubac.Text = txt_ngaygiubac.Text.Trim();
            if (txt_ngaygiubac.Text == "/  /")
            {
                return;
            }
            if (!mDB.kiemtrangayhople(txt_ngaygiubac.Text.Trim()))
            {
                txt_ngaydenct.Focus();
                return;
            }

            if (txt_ngaygiubac.Text != "" && txt_ngaygiubac.Text != "__/__/____")
            {
                //s_mmyy = txt_ngaygiubac.Text.Substring(3, 2) + txt_ngaygiubac.Text.Substring(8, 2);
                int ddns = 0, mmns = 0, yyns = 0;
                try
                {
                    ddns = int.Parse(txt_ngaygiubac.Text.Substring(0, 2));
                    mmns = int.Parse(txt_ngaygiubac.Text.Substring(3, 2));
                    yyns = int.Parse(txt_ngaygiubac.Text.Substring(6, 4));
                }
                catch { }

                int dd = 0, mm = 0, yy = 0;
                try
                {
                    dd = int.Parse(txt_ngayhuongluong.Text.Substring(0, 2));
                    mm = int.Parse(txt_ngayhuongluong.Text.Substring(3, 2));
                    yy = int.Parse(txt_ngayhuongluong.Text.Substring(6, 4));
                }
                catch { }
                try
                {
                    if (yyns < yy)
                    {
                        MessageBox.Show(lan.Change_language_MessageText("Ngày hưởng lương ") + txt_ngayhuongluong.Text + lan.Change_language_MessageText(" phải nhỏ hơn ngày nâng lương"), AccessData.Msg);
                        txt_ngaygiubac.Focus();
                        return;
                    }
                    if (yyns == yy)
                    {
                        if (mmns < mm)
                        {
                            MessageBox.Show(lan.Change_language_MessageText("Ngày hưởng lương " + txt_ngayhuongluong.Text + " phải nhỏ hơn ngày nâng lương"), AccessData.Msg);
                            txt_ngaygiubac.Focus();
                            return;
                        }
                        if (mmns == mm)
                        {
                            if (ddns < dd)
                            {
                                MessageBox.Show(lan.Change_language_MessageText("Ngày hưởng lương " + txt_ngayhuongluong.Text + " phải nhỏ hơn ngày nâng lương"), AccessData.Msg);
                                txt_ngaygiubac.Focus();
                                return;
                            }
                        }
                    }
                }
                catch { }
                cbo_bac_Validated(null, null);
            }
        }

        private void txt_mltt_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void txt_mltt_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (!IsNumeric(e.KeyChar.ToString()))
                e.Handled = true;
            if (e.KeyChar == 8 || e.KeyChar == '.')
                e.Handled = false;
        }

        private void txt_mltt_Validated(object sender, EventArgs e)
        {
            decimal tyle_tv = 0, m_hesol = 0, luongct = 0;
            try
            {
                if (cbo_loaihd.SelectedValue.ToString().Trim() == "TV")
                {
                    tyle_tv = decimal.Parse(mDB.tyle_tv(s_mmyy).ToString());
                    m_hesol = decimal.Parse(txt_hesolc.Text.ToString());
                    luongct = m_hesol * (decimal)mDB.pltoithieu() * tyle_tv / 100;
                    txt_luongcb.Text = luongct.ToString("###,###");
                }
                else
                {
                    decimal luong_cb = Math.Round(Convert.ToDecimal(txt_mltt.Text.Trim()) * Convert.ToDecimal(txt_hesolc.Text.Trim()));
                    txt_luongcb.Text = luong_cb.ToString("###,###");
                }
            }
            catch
            {
                txt_luongcb.Text = "0";
            }
        }

        private void txt_luongcb_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void txt_luongcb_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (!IsNumeric(e.KeyChar.ToString()))
                e.Handled = true;
            if (e.KeyChar == 8 || e.KeyChar == '.')
                e.Handled = false;
        }
        private void txt_sotienhd_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void txt_sotienhd_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (!IsNumeric(e.KeyChar.ToString()))
                e.Handled = true;
            if (e.KeyChar == 8 || e.KeyChar == '.')
                e.Handled = false;
        }

        private void txt_sotienhd_Validated(object sender, EventArgs e)
        {
            decimal sotien_hd = txt_sotienhd.Text.Trim() != "" ? decimal.Parse(txt_sotienhd.Text.Trim()) : 0;
            txt_sotienhd.Text = sotien_hd.ToString("###,###");
        }

        private void txt_nhluonghd_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }
        private void txt_nhluonghd_Validated(object sender, EventArgs e)
        {
            DateTime d_ndenct=DateTime.Now.Date;
            DateTime d_nhlhopdong=DateTime.Now.Date;
            if (txt_ngaydenct.Text.ToString().Trim() != "/  /")
            {
                d_ndenct = Convert.ToDateTime(mDB.StringToDate(txt_ngaydenct.Text.ToString().Trim()));
            }
            if (txt_nhluonghd.Text.ToString().Trim() != "/  /")
            {
                d_nhlhopdong = Convert.ToDateTime(mDB.StringToDate(txt_nhluonghd.Text.ToString().Trim()));
            }
            if (d_nhlhopdong < d_ndenct)
            {
                MessageBox.Show(lan.Change_language_MessageText("Ngày hưởng lương hợp đồng phải bé hơn ngày đến công tác"),AccessData.Msg);
                txt_nhluonghd.Focus();
            }
        }
        private void txt_ngayhuongluong_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void txt_ngayhuongluong_Validated(object sender, EventArgs e)
        {
            txt_ngayhuongluong.Text = txt_ngayhuongluong.Text.Trim();
            if (txt_ngayhuongluong.Text == "/  /")
            {
                return;
            }
            if (!mDB.kiemtrangayhople(txt_ngayhuongluong.Text.Trim()))
            {
                txt_ngayhuongluong.Focus();
                return;
            }
        }

        private void txt_ngaybhiem_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void txt_ngaybhiem_Validated(object sender, EventArgs e)
        {
            DateTime d1;
            txt_ngaybhiem.Text = txt_ngaybhiem.Text.Trim();
            if (txt_ngaybhiem.Text.Trim() == "/  /")
            {
                return;
            }
            if (!mDB.kiemtrangayhople(txt_ngaybhiem.Text.Trim()))
            {
                txt_ngaybhiem.Focus();
                return;
            }

            if (txt_ngaybhiem.Text.Trim() != "")
            {
                d1 = mDB.StringToDate(txt_ngaybhiem.Text.Trim());
                if (DateTime.Compare(d1, DateTime.Now) > 0)
                {
                    MessageBox.Show(lan.Change_language_MessageText("Ngày tính BHXH phải nhỏ hơn ngày hiện hành "), AccessData.Msg);
                    txt_ngaybhiem.Focus();
                    return;
                }
            }
        }

        private void chk_bhxh_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                SendKeys.Send("{Tab}");
            }
        }

        private void chk_bhyt_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                chk_bhtn.Focus();
        }

        private void chk_bhtn_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                cbo_hsbdhv.Focus();
                SendKeys.Send("{F4}");
            }
        }

        private void cbo_hsbdhv_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter) 
                SendKeys.Send("{Tab}{F4}");
        }

        private void cbo_ghichu_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void chk_tbnghihuu_CheckedChanged(object sender, EventArgs e)
        {
            if (chk_tbnghihuu.Checked)
            {
                // lblnangluong.Visible = true;
                num_sothangtbnh.Enabled = true;
            }
            else
            {
                //lblnangluong.Visible = false;
                num_sothangtbnh.Enabled = false;
            }
        }

        private void chk_tbnghihuu_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter) 
                SendKeys.Send("{Tab}");
        }

        private void num_sothangtbnh_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter) 
                SendKeys.Send("{Tab}");
        }

        private void txt_ngayphep_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void txt_ngayphep_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (!IsNumeric(e.KeyChar.ToString()))
                e.Handled = true;
            if (e.KeyChar == 8 || e.KeyChar == '.')
                e.Handled = false;
        }

        private void txt_ngayphep_Validated(object sender, EventArgs e)
        {
            try
            { Convert.ToInt32(txt_ngayphep.Text.Trim()); }
            catch
            { txt_ngayphep.Text = "0"; }

            if (txt_ngaybhiem.Text != "  /  /")
            {
                int yyct = Convert.ToInt32(txt_ngaybhiem.Text.Substring(6, 4));
                int nam = Convert.ToInt32(DateTime.Now.Year.ToString()) - yyct;
                int phepthem = nam / 5;
                if (phepthem >= 1)
                {
                    txt_phepthem.Text = phepthem.ToString();
                }
                else
                {
                    txt_phepthem.Text = "0";
                }
            }
            else
            {
                txt_phepthem.Text = "0";
            }
        }

        private void txt_phepthem_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void txt_phepthem_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (!IsNumeric(e.KeyChar.ToString()))
                e.Handled = true;
            if (e.KeyChar == 8 || e.KeyChar == '.')
                e.Handled = false;
        }

        private void txt_phepthem_Validated(object sender, EventArgs e)
        {
            try 
            { 
                Convert.ToInt32(txt_phepthem.Text.Trim()); 
            }
            catch 
            { 
                txt_phepthem.Text = "0"; 
            }
        }

        private void cbo_lhdbantg_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }
        private void cbo_lhdbantg_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (this.ActiveControl == this.cbo_lhdbantg)
            {
                if (cbo_lhdbantg.SelectedIndex != -1)
                {
                    lbl_sthdbantg.Text = "Số tiền làm việc 1 " + cbo_lhdbantg.Text.ToLower();
                }
            }
        }

        private void txt_stbantg_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                if (luong_sp == 1)
                {
                    chk_luongsp.Focus();
                }
                else
                {
                    txt_hscv.Focus();
                }
            }

        }

        private void txt_stbantg_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (!IsNumeric(e.KeyChar.ToString()))
                e.Handled = true;
            if (e.KeyChar == 8 || e.KeyChar == '.')
                e.Handled = false;
        }

        private void chk_luongsp_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void txt_tungaytv_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter) 
                SendKeys.Send("{Tab}");
        }

        private void txt_denngaytv_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter) 
                SendKeys.Send("{Tab}");
        }

        private void txt_ngaychinhthuc_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter) 
                SendKeys.Send("{Tab}");
        }

        private void txt_hesolc_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void txt_hesolc_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (!IsNumeric(e.KeyChar.ToString()))
                e.Handled = true;
            if (e.KeyChar == 8 || e.KeyChar == '.')
                e.Handled = false;
        }

        private void txt_hsvk_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void txt_hsvk_Validated(object sender, EventArgs e)
        {
            if (txt_hsvk.Text.Trim() == "")
                txt_hsvk.Text = "0";            
            txt_pctdt_Validated(null, null);
            txt_pckh_Validated(null, null);
        }

        private void txt_hsvk_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (!IsNumeric(e.KeyChar.ToString()))
                e.Handled = true;
            if (e.KeyChar == 8 || e.KeyChar == '.')
                e.Handled = false;
        }

        private void txt_ngayvk_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter) 
                SendKeys.Send("{Tab}");
        }

        private void txt_ngayvk_Validated(object sender, EventArgs e)
        {
            DateTime d1;
            txt_ngayvk.Text = txt_ngayvk.Text.Trim();

            if (txt_hsvk.Text != "0")
            {
                if (txt_ngayvk.Text.ToString().Trim() == "/  /")
                {
                    MessageBox.Show(lan.Change_language_MessageText("Bạn phải nhập ngày vượt khung "), AccessData.Msg);
                    txt_ngayvk.Focus();

                }
            }
            if (txt_ngayvk.Text.Trim() == "/  /")
            {
                return;
            }
            if (!mDB.kiemtrangayhople(txt_ngayvk.Text.Trim()))
            {
                txt_ngayvk.Focus();
                return;
            }
            if (txt_ngayvk.Text != "" && txt_ngayvk.Text != "__/__/____")
            {
                int ddns = 0, mmns = 0, yyns = 0;
                try
                {
                    ddns = int.Parse(txt_ngayvk.Text.Substring(0, 2));
                    mmns = int.Parse(txt_ngayvk.Text.Substring(3, 2));
                    yyns = int.Parse(txt_ngayvk.Text.Substring(6, 4));
                }
                catch { }

                int dd = 0, mm = 0, yy = 0;
                try
                {
                    dd = int.Parse(txt_ngaygiubac.Text.Substring(0, 2));
                    mm = int.Parse(txt_ngaygiubac.Text.Substring(3, 2));
                    yy = int.Parse(txt_ngaygiubac.Text.Substring(6, 4));
                }
                catch { }
                try
                {
                    if (yyns < yy)
                    {
                        MessageBox.Show(lan.Change_language_MessageText("Năm của ngày nâng lương vượt khung" + txt_ngayvk.Text + " phải lớn hơn năm của ngày nâng lương"), AccessData.Msg);
                        txt_ngayvk.Focus();
                        return;
                    }
                    if (yyns == yy)
                    {
                        if (mmns < mm)
                        {
                            MessageBox.Show(lan.Change_language_MessageText("Tháng của ngày nâng lương vượt khung" + txt_ngayvk.Text + " phải lớn hơn tháng của ngày nâng lương"), AccessData.Msg);
                            txt_ngayvk.Focus();
                            return;
                        }
                        if (mmns == mm)
                        {
                            if (ddns < dd)
                            {
                                MessageBox.Show(lan.Change_language_MessageText("Ngày của ngày nâng lương vượt khung " + txt_ngayvk.Text + " phải nhỏ hơn ngày nâng lương"), AccessData.Msg);
                                txt_ngayvk.Focus();
                                return;
                            }
                        }
                    }
                }
                catch { }
            }
        }

        private void txt_hscv_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void txt_hscv_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (!IsNumeric(e.KeyChar.ToString()))
                e.Handled = true;
            if (e.KeyChar == 8 || e.KeyChar == '.')
                e.Handled = false;
        }

        private void txt_hscv_Validated(object sender, EventArgs e)
        {
            if (txt_hscv.Text.Trim() == "")
                txt_hscv.Text = "0";
            txt_pctdt_Validated(null, null);
            txt_pckh_Validated(null, null);
        }

        private void txt_hsdb_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (!IsNumeric(e.KeyChar.ToString()))
                e.Handled = true;
            if (e.KeyChar == 8 || e.KeyChar == '.')
                e.Handled = false;
        }

        private void txt_hsdb_Validated(object sender, EventArgs e)
        {
            if (txt_hsdb.Text.Trim() == "")
                txt_hsdb.Text = "0";
            txt_pctdt_Validated(null, null);
            txt_pckh_Validated(null, null);
        }

        private void txt_hsth_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void txt_hsth_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (!IsNumeric(e.KeyChar.ToString()))
                e.Handled = true;
            if (e.KeyChar == 8 || e.KeyChar == '.')
                e.Handled = false;
        }

        private void txt_hsth_Validated(object sender, EventArgs e)
        {
            if (txt_hsth.Text.Trim() == "")
                txt_hsth.Text = "0";
            txt_pctdt_Validated(null, null);
            txt_pckh_Validated(null, null);
        }

        private void txt_hsld_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void txt_hsld_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (!IsNumeric(e.KeyChar.ToString()))
                e.Handled = true;
            if (e.KeyChar == 8 || e.KeyChar == '.')
                e.Handled = false;
        }

        private void txt_hsld_Validated(object sender, EventArgs e)
        {
            if (txt_hsld.Text.Trim() == "")
                txt_hsld.Text = "0";
            txt_pctdt_Validated(null, null);
            txt_pckh_Validated(null, null);
        }

        private void txt_hsdh_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                SendKeys.Send("{Tab}");
            }            
        }

        private void txt_hsdh_KeyPress(object sender, KeyPressEventArgs e)
        {           
            if (!IsNumeric(e.KeyChar.ToString()))
                e.Handled = true;
            if (e.KeyChar == 8 || e.KeyChar == '.')
                e.Handled = false;
        }        
        private void txt_hsdh_Validated(object sender, EventArgs e)
        {
            if (txt_hsdh.Text.Trim() == "")
                txt_hsdh.Text = "0";
            txt_pctdt_Validated(null, null);
            txt_pckh_Validated(null, null);
        }

        private void txt_hskv_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void txt_hskv_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (!IsNumeric(e.KeyChar.ToString()))
                e.Handled = true;
            if (e.KeyChar == 8 || e.KeyChar == '.')
                e.Handled = false;
        }

        private void txt_hskv_Validated(object sender, EventArgs e)
        {
            if (txt_hskv.Text.Trim() == "")
                txt_hskv.Text = "0";
            txt_pctdt_Validated(null, null);
            txt_pckh_Validated(null, null);
        }

        private void txt_hsdt_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void txt_hsdt_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (!IsNumeric(e.KeyChar.ToString()))
                e.Handled = true;
            if (e.KeyChar == 8 || e.KeyChar == '.')
                e.Handled = false;
        }

        private void txt_hsud_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void txt_hsud_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (!IsNumeric(e.KeyChar.ToString()))
                e.Handled = true;
            if (e.KeyChar == 8 || e.KeyChar == '.')
                e.Handled = false;
        }

        private void txt_hsud_Validated(object sender, EventArgs e)
        {
            if (txt_hsud.Text.Trim() == "")
                txt_hsud.Text = "0";
            txt_pctdt_Validated(null, null);
            txt_pckh_Validated(null, null);
        }

        private void txt_hstn_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void txt_hstn_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (!IsNumeric(e.KeyChar.ToString()))
                e.Handled = true;
            if (e.KeyChar == 8 || e.KeyChar == '.')
                e.Handled = false;
        }

        private void txt_pcta_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void txt_pcta_Validated(object sender, EventArgs e)
        {
            if (txt_pcta.Text == "")
                txt_pcta.Text = "0";
            txt_pctdt_Validated(null, null);
            txt_pckh_Validated(null, null);
        }

        private void txt_pctx_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }
        private void txt_pctx_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (!IsNumeric(e.KeyChar.ToString()))
                e.Handled = true;
            if (e.KeyChar == 8 || e.KeyChar == '.')
                e.Handled = false;
        }
        private void txt_pctdt_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void txt_pctdt_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (!IsNumeric(e.KeyChar.ToString()))
                e.Handled = true;
            if (e.KeyChar == 8 || e.KeyChar == '.')
                e.Handled = false;
        }    
        
        private void txt_pctx_Validated(object sender, EventArgs e)
        {
            if (txt_pctx.Text == "")
                txt_pctx.Text = "0";
            txt_pctdt_Validated(null, null);
            txt_pckh_Validated(null, null);
        }

        private void txt_pctdt_Validated(object sender, EventArgs e)
        {
            decimal sotien_hd = 0, mltt = 0, luongcb = 0, hs_lc = 0, hs_vk = 0, hs_cv = 0, hs_dh = 0, hs_ld = 0
                , hs_ud = 0, pc_tx = 0, hs_th = 0, hs_kv = 0, pc_ta = 0, pc_khac = 0, tn_nghe = 0, hs_dt = 0, hs_db = 0,pc_tdt=0;
            decimal st_luongcb = 0, st_cv = 0, st_vk = 0, st_dh = 0, st_ld = 0, st_ud = 0, st_th = 0, st_kv = 0, st_tn = 0, st_tx = 0, st_ta = 0, st_dt = 0, st_db = 0,st_tdt=0;

            sotien_hd = txt_sotienhd.Text.Trim() != "" ? decimal.Parse(txt_sotienhd.Text.Trim()) : 0;
            mltt = txt_mltt.Text.Trim() != "" ? decimal.Parse(txt_mltt.Text.Trim()) : 0;
            luongcb = txt_luongcb.Text.Trim() != "" ? decimal.Parse(txt_luongcb.Text.Trim()) : 0;
            hs_lc = txt_hesolc.Text.Trim() != "" ? decimal.Parse(txt_hesolc.Text.Trim()) : 0;
            hs_vk = txt_hsvk.Text.Trim() != "" ? decimal.Parse(txt_hsvk.Text.Trim()) : 0;
            if (txt_hsvk.Text.Trim() != "")
            {
                if (s_stvk.Trim() == "1")
                {
                    st_vk = decimal.Parse(txt_hsvk.Text.Trim());
                }
                if (s_tlvk.Trim() == "1")
                {
                    hs_vk = decimal.Parse(txt_hsvk.Text.Trim());
                    st_vk = (hs_lc * (hs_vk / 100)) * mltt;
                }
                else
                {
                    hs_vk = decimal.Parse(txt_hsvk.Text.Trim());
                    st_vk = hs_vk * mltt;
                }
            }
            if (txt_hscv.Text.Trim() != "")
            {
                if (s_stcv.Trim() == "1")
                {
                    st_cv = decimal.Parse(txt_hscv.Text.Trim());
                }
                else
                {
                    hs_cv = decimal.Parse(txt_hscv.Text.Trim());
                    st_cv = hs_cv * mltt;
                }
            }
            if (txt_hsdh.Text.Trim() != "")
            {
                if (s_stdh.Trim() == "1")
                {
                    st_dh = decimal.Parse(txt_hsdh.Text.Trim());
                }
                else
                {
                    hs_dh = decimal.Parse(txt_hsdh.Text.Trim());
                    st_dh = hs_dh * mltt;
                }
            }
            if (txt_hsld.Text.Trim() != "")
            {
                if (s_stld.Trim() == "1")
                {
                    st_ld = decimal.Parse(txt_hsld.Text.Trim());
                }
                else
                {
                    hs_ld = decimal.Parse(txt_hsld.Text.Trim());
                    st_ld = hs_ld * mltt;
                }
            }
            if (txt_hsud.Text.Trim() != "")
            {
                if (s_stud.Trim() == "1")
                {
                    st_ud = decimal.Parse(txt_hsud.Text.Trim());
                }
                if (s_tlud.Trim() == "1")
                {
                    hs_ud = decimal.Parse(txt_hsud.Text.Trim());
                    st_ud = (hs_ud * (hs_lc * (1 + hs_vk))) * mltt / 100;
                }
                else
                {
                    hs_ud = decimal.Parse(txt_hsud.Text.Trim());
                    st_ud = hs_ud * mltt;
                }
            }
            if (txt_hsth.Text.Trim() != "")
            {
                if (s_stth.Trim() == "1")
                {
                    st_th = decimal.Parse(txt_hsth.Text.Trim());
                }
                else
                {
                    hs_th = decimal.Parse(txt_hsth.Text.Trim());
                    st_th = hs_th * mltt;
                }
            }
            if (txt_hskv.Text.Trim() != "")
            {
                if (s_stkv.Trim() == "1")
                {
                    st_kv = decimal.Parse(txt_hskv.Text.Trim());
                }
                else
                {
                    hs_kv = decimal.Parse(txt_hskv.Text.Trim());
                    st_kv = hs_kv * mltt;
                }
            }
            if (txt_hstn.Text.Trim() != "")
            {
                if (s_sttn.Trim() == "1")
                {
                    st_tn = decimal.Parse(txt_hstn.Text.Trim());
                }
                else
                {
                    tn_nghe = decimal.Parse(txt_hstn.Text.Trim());
                    st_tn = tn_nghe * mltt;
                }
            }
            if (txt_hsdb.Text.Trim() != "")
            {
                if (s_stdb.Trim() == "1")
                {
                    st_db = decimal.Parse(txt_hsdb.Text.Trim());
                }
                if (s_tldb.Trim() == "1")
                {
                    hs_db = decimal.Parse(txt_hsdb.Text.Trim());
                    st_db = (hs_db * hs_lc) * mltt / 100;
                }
                else
                {
                    hs_db = decimal.Parse(txt_hsdb.Text.Trim());
                    st_db = hs_db * mltt;
                }
            }
            if (txt_hsdt.Text.Trim() != "")
            {
                if (s_stdt.Trim() == "1")
                {
                    st_dt = decimal.Parse(txt_hsdt.Text.Trim());
                }
                if (s_tldt.Trim() == "1")
                {
                    hs_dt = decimal.Parse(txt_hsdt.Text.Trim());
                    st_dt = (hs_dt * hs_lc) * mltt / 100;
                }
                else
                {
                    hs_dt = decimal.Parse(txt_hsdt.Text.Trim());
                    st_dt = hs_dt * mltt;
                }
            }
            if (txt_pcta.Text.Trim() != "")
            {
                if (s_stta.Trim() == "1")
                {
                    st_ta = decimal.Parse(txt_pcta.Text.Trim());
                }
                else
                {
                    pc_ta = decimal.Parse(txt_pcta.Text.Trim());
                    st_ta = pc_ta * mltt;
                }
            }
            if (txt_pctx.Text.Trim() != "")
            {
                if (s_sttx.Trim() == "1")
                {
                    st_tx = decimal.Parse(txt_pctx.Text.Trim());
                }
                else
                {
                    pc_tx = decimal.Parse(txt_pctx.Text.Trim());
                    st_tx = pc_tx * mltt;
                }
            }
            if (txt_pctdt.Text.Trim() != "")
            {
                if (s_sttdt.Trim() == "1")
                {
                    st_tdt = decimal.Parse(txt_pctdt.Text.Trim());
                }
                else
                {
                    pc_tdt = decimal.Parse(txt_pctdt.Text.Trim());
                    st_tdt = pc_tdt * mltt;
                }
            }
            if (sotien_hd > 0)
            {
                pc_khac = sotien_hd - (luongcb + st_cv + st_dh + st_ld + st_ud + st_th + st_kv + st_ta + st_tx + st_tn + st_dt + st_vk + st_db+st_tdt);
                txt_pckh.Text = pc_khac.ToString("###,###");
            }
            else
            {
                txt_pckh.Text = "0";
            } 
        }
        private void txt_pckh_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }
        private void txt_pckh_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (!IsNumeric(e.KeyChar.ToString()))
                e.Handled = true;
            if (e.KeyChar == 8 || e.KeyChar == '.')
                e.Handled = false;
        }
        private void txt_pckh_Validated(object sender, EventArgs e)
        {
            decimal sotien_hd = 0, mltt = 0, luongcb = 0, hs_lc = 0, hs_vk = 0, hs_cv = 0, hs_dh = 0, hs_ld = 0
                , hs_ud = 0, pc_tx = 0, hs_th = 0, hs_kv = 0, pc_ta = 0, tn_nghe = 0, hs_dt = 0, hs_db = 0, pc_tdt = 0,pc_khac = 0;
            decimal st_luongcb = 0, st_cv = 0, st_vk = 0, st_dh = 0, st_ld = 0, st_ud = 0, st_th = 0, st_kv = 0, st_tn = 0, st_tx = 0, st_ta = 0, st_dt = 0, st_db = 0, st_tdt = 0,st_khac=0,st_tongluong=0;

            sotien_hd = txt_sotienhd.Text.Trim() != "" ? decimal.Parse(txt_sotienhd.Text.Trim()) : 0;
            mltt = txt_mltt.Text.Trim() != "" ? decimal.Parse(txt_mltt.Text.Trim()) : 0;
            luongcb = txt_luongcb.Text.Trim() != "" ? decimal.Parse(txt_luongcb.Text.Trim()) : 0;
            hs_lc = txt_hesolc.Text.Trim() != "" ? decimal.Parse(txt_hesolc.Text.Trim()) : 0;
            hs_vk = txt_hsvk.Text.Trim() != "" ? decimal.Parse(txt_hsvk.Text.Trim()) : 0;
            if (txt_hsvk.Text.Trim() != "")
            {
                if (s_stvk.Trim() == "1")
                {
                    st_vk = decimal.Parse(txt_hsvk.Text.Trim());
                }
                if (s_tlvk.Trim() == "1")
                {
                    hs_vk = decimal.Parse(txt_hsvk.Text.Trim());
                    st_vk = (hs_lc * (hs_vk/100)) * mltt;
                }
                else
                {
                    hs_vk = decimal.Parse(txt_hsvk.Text.Trim());
                    st_vk = hs_vk * mltt;
                }
            }
            if (txt_hscv.Text.Trim() != "")
            {
                if (s_stcv.Trim() == "1")
                {
                    st_cv = decimal.Parse(txt_hscv.Text.Trim());
                }
                else
                {
                    hs_cv = decimal.Parse(txt_hscv.Text.Trim());
                    st_cv = hs_cv * mltt;
                }
            }
            if (txt_hsdh.Text.Trim() != "")
            {
                if (s_stdh.Trim() == "1")
                {
                    st_dh = decimal.Parse(txt_hsdh.Text.Trim());
                }
                else
                {
                    hs_dh = decimal.Parse(txt_hsdh.Text.Trim());
                    st_dh = hs_dh * mltt;
                }
            }
            if (txt_hsld.Text.Trim() != "")
            {
                if (s_stld.Trim() == "1")
                {
                    st_ld = decimal.Parse(txt_hsld.Text.Trim());
                }
                else
                {
                    hs_ld = decimal.Parse(txt_hsld.Text.Trim());
                    st_ld = hs_ld * mltt;
                }
            }
            if (txt_hsud.Text.Trim() != "")
            {
                if (s_stud.Trim() == "1")
                {
                    st_ud = decimal.Parse(txt_hsud.Text.Trim());
                }
                if (s_tlud.Trim() == "1")
                {
                    hs_ud = decimal.Parse(txt_hsud.Text.Trim());
                    st_ud = (hs_ud * (hs_lc * (1 + hs_vk))) * mltt / 100;
                }
                else
                {
                    hs_ud = decimal.Parse(txt_hsud.Text.Trim());
                    st_ud = hs_ud * mltt;
                }
            }
            if (txt_hsth.Text.Trim() != "")
            {
                if (s_stth.Trim() == "1")
                {
                    st_th = decimal.Parse(txt_hsth.Text.Trim());
                }
                else
                {
                    hs_th = decimal.Parse(txt_hsth.Text.Trim());
                    st_th = hs_th * mltt;
                }
            }
            if (txt_hskv.Text.Trim() != "")
            {
                if (s_stkv.Trim() == "1")
                {
                    st_kv = decimal.Parse(txt_hskv.Text.Trim());
                }
                else
                {
                    hs_kv = decimal.Parse(txt_hskv.Text.Trim());
                    st_kv = hs_kv * mltt;
                }
            }
            if (txt_hstn.Text.Trim() != "")
            {
                if (s_sttn.Trim() == "1")
                {
                    st_tn = decimal.Parse(txt_hstn.Text.Trim());
                }
                else
                {
                    tn_nghe = decimal.Parse(txt_hstn.Text.Trim());
                    st_tn = tn_nghe * mltt;
                }
            }
            if (txt_hsdb.Text.Trim() != "")
            {
                if (s_stdb.Trim() == "1")
                {
                    st_db = decimal.Parse(txt_hsdb.Text.Trim());
                }
                if (s_tldb.Trim() == "1")
                {
                    hs_db = decimal.Parse(txt_hsdb.Text.Trim());
                    st_db = (hs_db * hs_lc) * mltt / 100;
                }
                else
                {
                    hs_db = decimal.Parse(txt_hsdb.Text.Trim());
                    st_db = hs_db * mltt;
                }
            }
            if (txt_hsdt.Text.Trim() != "")
            {
                if (s_stdt.Trim() == "1")
                {
                    st_dt = decimal.Parse(txt_hsdt.Text.Trim());
                }
                if (s_tldt.Trim() == "1")
                {
                    hs_dt = decimal.Parse(txt_hsdt.Text.Trim());
                    st_dt = (hs_dt * hs_lc) * mltt / 100;
                }
                else
                {
                    hs_dt = decimal.Parse(txt_hsdt.Text.Trim());
                    st_dt = hs_dt * mltt;
                }
            }
            if (txt_pcta.Text.Trim() != "")
            {
                if (s_stta.Trim() == "1")
                {
                    st_ta = decimal.Parse(txt_pcta.Text.Trim());
                }
                else
                {
                    pc_ta = decimal.Parse(txt_pcta.Text.Trim());
                    st_ta = pc_ta * mltt;
                }
            }
            if (txt_pctx.Text.Trim() != "")
            {
                if (s_sttx.Trim() == "1")
                {
                    st_tx = decimal.Parse(txt_pctx.Text.Trim());
                }
                else
                {
                    pc_tx = decimal.Parse(txt_pctx.Text.Trim());
                    st_tx = pc_tx * mltt;
                }
            }
            if (txt_pctdt.Text.Trim() != "")
            {
                if (s_sttdt.Trim() == "1")
                {
                    st_tdt = decimal.Parse(txt_pctdt.Text.Trim());
                }
                else
                {
                    pc_tdt = decimal.Parse(txt_pctdt.Text.Trim());
                    st_tdt = pc_tdt * mltt;
                }
            }
            if (txt_pckh.Text.Trim() != "")
            {
                if (s_stkh.Trim() == "1")
                {
                    st_khac = decimal.Parse(txt_pckh.Text.Trim());
                }
                else
                {
                    pc_khac = decimal.Parse(txt_pckh.Text.Trim());
                    st_khac = pc_khac * mltt;
                }
            }
            st_tongluong = luongcb + st_cv + st_dh + st_ld + st_ud + st_th + st_kv + st_ta + st_tx + st_tn + st_dt + st_vk + st_db + st_tdt+st_khac;
            txt_tongcong.Text = st_tongluong.ToString("#,###,###");             
        }
        private void txt_ngaynghi_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                if (txt_ngaynghi.Text.Trim() == "/  /")
                {
                    btn_luu.Focus();
                }
                else
                {
                    cbo_lydonghi.Focus();
                    SendKeys.Send("{F4}");
                }
            }
                
        }

        private void txt_ngaynghi_Validated(object sender, EventArgs e)
        {
            txt_ngaynghi.Text = txt_ngaynghi.Text.Trim();
            if (txt_ngaynghi.Text.Trim() == "/  /")
            {
                btn_luu.Focus();
            }
            if (txt_ngaynghi.Text.Trim() != "/  /")
            {
                if (!mDB.kiemtrangayhople(txt_ngaynghi.Text))
                {
                    txt_ngaynghi.Focus();
                    return;
                }
                int ddns = 0, mmns = 0, yyns = 0;
                try
                {
                    ddns = int.Parse(txt_ngaynghi.Text.Substring(0, 2));
                    mmns = int.Parse(txt_ngaynghi.Text.Substring(3, 2));
                    yyns = int.Parse(txt_ngaynghi.Text.Substring(6, 4));
                }
                catch { }
                int dd = 0, mm = 0, yy = 0;
                try
                {
                    dd = int.Parse(txt_ngaydenct.Text.Substring(0, 2));
                    mm = int.Parse(txt_ngaydenct.Text.Substring(3, 2));
                    yy = int.Parse(txt_ngaydenct.Text.Substring(6, 4));
                }
                catch { }
                try
                {
                    if (yyns < yy)
                    {
                        MessageBox.Show(lan.Change_language_MessageText("Năm của ngày công tác " + txt_ngaydenct.Text + " phải nhỏ hơn năm của ngày nghỉ việc"), AccessData.Msg);
                        txt_ngaynghi.Focus();
                        return;
                    }
                    if (yyns == yy)
                    {
                        if (mmns < mm)
                        {
                            MessageBox.Show(lan.Change_language_MessageText("Tháng của ngày công tác " + txt_ngaydenct.Text + " phải nhỏ hơn tháng của ngày nghỉ việc"), AccessData.Msg);
                            txt_ngaynghi.Focus();
                            return;
                        }
                        if (mmns == mm)
                        {
                            if (ddns < dd)
                            {
                                MessageBox.Show(lan.Change_language_MessageText("Ngày của ngày công tác " + txt_ngaydenct.Text + " phải nhỏ hơn ngày nghỉ việc"), AccessData.Msg);
                                txt_ngaynghi.Focus();
                                return;
                            }
                        }
                    }
                }
                catch { }
                SendKeys.Send("{F4}{Tab}");
            }
        }

        private void cbo_lydonghi_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void chk_xemttkt_CheckStateChanged(object sender, EventArgs e)
        {
            if (chk_xemttkt.Checked)
            {
                chk_xemhsl.Checked = false;
                frmHopdong_khenthuong hk = new frmHopdong_khenthuong(lblMasoNVCT.Text.Trim(), false, lan.Change_language_MessageText("Khen thưởng"));
                hk.ShowDialog();
                chk_xemttkt.Checked = false;
            }
            else
            {
                //groupDTCQ.Visible = false;
                //groupDT.Visible = false;
            }
        }

        private void chk_xemttkt_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void chk_xemhsl_CheckedChanged(object sender, EventArgs e)
        {
            if (chk_xemhsl.Checked)
            {

                chk_xemttkt.Checked = false;
                chk_xemttkl.Checked = false;
                dgrhsl.Visible = true;
                dgrhsl.BringToFront();
            }
            else
            {
                dgrhsl.Visible = false;
                dgrhsl.SendToBack();
            }
        }

        private void chk_xemhsl_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{tab}");
        }

        private void chk_xemttkl_CheckStateChanged(object sender, EventArgs e)
        {
            if (chk_xemttkl.Checked)
            {
                chk_xemhsl.Checked = false;
                frmHopdong_khenthuong kl = new frmHopdong_khenthuong(lblMasoNVCT.Text.Trim(), true, lan.Change_language_MessageText("Kỷ luật"));
                kl.ShowDialog();
                chk_xemttkl.Checked = false;
            }
        }

        private void chk_xemttkl_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }
         
    }
}
